blob: 051036d52a0cd24ab694a43b4635ea643cfa093b [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.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700253 &quot;pointInTime&quot;: &quot;A String&quot;, # Timestamp, if specified, identifies the time to which the source instance is cloned.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800254 },
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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400763 &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*, *POSTGRES_12*, or *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800764 &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 },
yoshi-code-bot36591372021-06-16 00:22:06 -0700801 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
802 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
803 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -0700804 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800805 &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.
806 &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.
807 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
808 &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.
809 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
810 &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 -0800811 &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 -0800812 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800813 &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 -0800814 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
815 &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.
816 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
817 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
818 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
819 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
820 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
821 &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 -0800822 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800823 },
824 &quot;replicaNames&quot;: [ # The replicas of the instance.
825 &quot;A String&quot;,
826 ],
827 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700828 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800829 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
830 &quot;canDefer&quot;: True or False,
831 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700832 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800833 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
834 },
835 &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.
836 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
837 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
838 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
839 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
840 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
841 &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*
842 &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*.
843 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
844 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800845 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800846 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
847 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700848 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800849 &quot;settings&quot;: { # Database instance settings. # The user settings.
850 &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.
851 &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.
852 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
853 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800854 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800855 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
856 &quot;A String&quot;,
857 ],
858 &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.
859 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
860 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
861 &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.
862 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800863 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800864 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
865 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
866 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
867 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700868 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800869 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
870 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
871 &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 -0800872 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800873 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
874 &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.
875 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
876 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
877 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
878 { # Database flags for Cloud SQL instances.
879 &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.
880 &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.
881 },
882 ],
883 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
884 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
885 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
886 &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
887 &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
888 &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
889 },
890 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800891 &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.
892 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700893 &quot;queryPlansPerMinute&quot;: 42, # Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700894 &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 -0800895 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
896 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
897 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800898 &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.
899 &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*).
900 { # An entry for an Access Control list.
901 &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*.
902 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
903 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
904 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
905 },
906 ],
907 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
908 &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.
909 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
910 },
911 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
912 &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.
913 &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.
914 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
915 &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.
916 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
917 },
918 &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.
919 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
920 &quot;hour&quot;: 42, # hour of day - 0 to 23.
921 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
922 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
923 },
924 &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.
925 &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.
926 &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.
927 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
928 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400929 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800930 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
931 &quot;a_key&quot;: &quot;A String&quot;,
932 },
933 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700934 &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 -0800935 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
936 &quot;A String&quot;,
937 ],
938}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800939</div>
940
941<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700942 <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700943 <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 -0800944
945Args:
946 project: string, Project ID of the project that contains the instance. (required)
947 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700948 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800949 The object takes the form of:
950
951{ # Database instance import request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800952 &quot;importContext&quot;: { # Database instance import context. # Contains details about the import operation.
953 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
954 &quot;encryptionOptions&quot;: {
955 &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.
956 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
957 &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 -0800958 },
Craig Citroe633be12015-03-02 13:40:36 -0800959 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800960 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
961 &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.
962 &quot;A String&quot;,
963 ],
964 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
965 },
966 &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.
967 &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.
968 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
969 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800970 &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 -0800971 },
972}
Craig Citroe633be12015-03-02 13:40:36 -0800973
Dan O'Mearadd494642020-05-01 07:42:23 -0700974 x__xgafv: string, V1 error format.
975 Allowed values
976 1 - v1 error format
977 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800978
979Returns:
980 An object of the form:
981
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700982 { # 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 -0800983 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
984 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
985 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
986 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800987 &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*.
988 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
989 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
990 { # Database instance operation error.
991 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
992 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
993 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
994 },
995 ],
996 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
997 },
998 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800999 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001000 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001001 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001002 &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 -08001003 &quot;A String&quot;,
1004 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001005 &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 -08001006 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1007 &quot;offload&quot;: True or False, # Option for export offload.
1008 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1009 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001010 &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 -08001011 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001012 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1013 &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 -08001014 &quot;A String&quot;,
1015 ],
1016 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001017 &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 -08001018 },
1019 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1020 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1021 &quot;encryptionOptions&quot;: {
1022 &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.
1023 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1024 &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 -08001025 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001026 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001027 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1028 &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.
1029 &quot;A String&quot;,
1030 ],
1031 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1032 },
1033 &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.
1034 &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.
1035 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1036 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001037 &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 -08001038 },
1039 &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*.
1040 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1041 &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.
1042 &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*
1043 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1044 &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*.
1045 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1046 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1047 &quot;targetLink&quot;: &quot;A String&quot;,
1048 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1049 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1050}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001051</div>
1052
1053<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001054 <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001055 <pre>Creates a new Cloud SQL instance.
1056
1057Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001058 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 -07001059 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001060 The object takes the form of:
1061
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001062{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001063 &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 -08001064 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1065 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001066 &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*, *POSTGRES_12*, or *POSTGRES_13* (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 -08001067 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1068 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1069 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1070 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001071 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1072 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1073 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1074 },
1075 &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.
1076 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1077 &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.
1078 &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.
1079 },
1080 &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.
1081 &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.
1082 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1083 { # Database instance IP Mapping.
1084 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1085 &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.
1086 &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.
1087 },
1088 ],
1089 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1090 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1091 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1092 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001093 &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 -08001094 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1095 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1096 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1097 &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.
1098 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1099 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1100 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1101 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1102 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1103 },
yoshi-code-bot36591372021-06-16 00:22:06 -07001104 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
1105 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
1106 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -07001107 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001108 &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.
1109 &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 -08001110 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1111 &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 -08001112 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001113 &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 -08001114 &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 -08001115 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1116 &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 -08001117 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1118 &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 -08001119 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1120 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1121 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1122 &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 -08001123 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1124 &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 -08001125 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001126 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001127 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001128 &quot;A String&quot;,
1129 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001130 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001131 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001132 &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 -08001133 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001134 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001135 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001136 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1137 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001138 &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.
1139 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1140 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1141 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1142 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1143 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1144 &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*
1145 &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*.
1146 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1147 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1148 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1149 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1150 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001151 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001152 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001153 &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 -08001154 &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 -08001155 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001156 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001157 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001158 &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 -08001159 &quot;A String&quot;,
1160 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001161 &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 -08001162 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1163 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1164 &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.
1165 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1166 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001167 &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 -08001168 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1169 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1170 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001171 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001172 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1173 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1174 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1175 },
1176 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1177 &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.
1178 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1179 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1180 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1181 { # Database flags for Cloud SQL instances.
1182 &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.
1183 &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.
1184 },
1185 ],
1186 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1187 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1188 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1189 &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
1190 &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
1191 &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
1192 },
1193 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001194 &quot;insightsConfig&quot;: { # Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration. # Insights configuration, for now relevant only for Postgres.
1195 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001196 &quot;queryPlansPerMinute&quot;: 42, # Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001197 &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 -08001198 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1199 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1200 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001201 &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.
1202 &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*).
1203 { # An entry for an Access Control list.
1204 &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*.
1205 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1206 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1207 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1208 },
1209 ],
1210 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1211 &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.
1212 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1213 },
1214 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1215 &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.
1216 &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.
1217 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1218 &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.
1219 &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 -08001220 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001221 &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.
1222 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1223 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1224 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1225 &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 -08001226 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001227 &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.
1228 &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.
1229 &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.
1230 &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 -08001231 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001232 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001233 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1234 &quot;a_key&quot;: &quot;A String&quot;,
1235 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001236 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001237 &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 -08001238 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1239 &quot;A String&quot;,
1240 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001241}
Craig Citroe633be12015-03-02 13:40:36 -08001242
Dan O'Mearadd494642020-05-01 07:42:23 -07001243 x__xgafv: string, V1 error format.
1244 Allowed values
1245 1 - v1 error format
1246 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001247
1248Returns:
1249 An object of the form:
1250
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001251 { # 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 -08001252 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1253 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1254 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1255 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001256 &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*.
1257 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1258 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1259 { # Database instance operation error.
1260 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1261 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1262 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1263 },
1264 ],
1265 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1266 },
1267 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001268 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001269 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001270 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001271 &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 -08001272 &quot;A String&quot;,
1273 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001274 &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 -08001275 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1276 &quot;offload&quot;: True or False, # Option for export offload.
1277 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1278 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001279 &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 -08001280 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001281 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1282 &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 -08001283 &quot;A String&quot;,
1284 ],
1285 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001286 &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 -08001287 },
1288 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1289 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1290 &quot;encryptionOptions&quot;: {
1291 &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.
1292 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1293 &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 -08001294 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001295 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001296 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1297 &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.
1298 &quot;A String&quot;,
1299 ],
1300 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1301 },
1302 &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.
1303 &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.
1304 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1305 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001306 &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 -08001307 },
1308 &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*.
1309 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1310 &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.
1311 &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*
1312 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1313 &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*.
1314 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1315 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1316 &quot;targetLink&quot;: &quot;A String&quot;,
1317 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1318 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1319}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001320</div>
1321
1322<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001323 <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 -07001324 <pre>Lists instances under a given project.
Craig Citroe633be12015-03-02 13:40:36 -08001325
1326Args:
1327 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001328 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 -08001329 maxResults: integer, The maximum number of results to return per response.
1330 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 -07001331 x__xgafv: string, V1 error format.
1332 Allowed values
1333 1 - v1 error format
1334 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001335
1336Returns:
1337 An object of the form:
1338
1339 { # Database instances list response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001340 &quot;items&quot;: [ # List of database instance resources.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001341 { # A Cloud SQL instance resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001342 &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.
1343 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1344 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001345 &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*, *POSTGRES_12*, or *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001346 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1347 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1348 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001349 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001350 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1351 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1352 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1353 },
1354 &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.
1355 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1356 &quot;available&quot;: True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
1357 &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.
1358 },
1359 &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.
1360 &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.
1361 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1362 { # Database instance IP Mapping.
1363 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1364 &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.
1365 &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.
1366 },
1367 ],
1368 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1369 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1370 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1371 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
1372 &quot;name&quot;: &quot;A String&quot;, # Name of the Cloud SQL instance. This does not include the project ID.
1373 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1374 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1375 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1376 &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.
1377 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1378 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1379 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1380 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1381 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1382 },
yoshi-code-bot36591372021-06-16 00:22:06 -07001383 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
1384 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
1385 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -07001386 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001387 &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.
1388 &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.
1389 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1390 &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.
1391 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
1392 &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 -08001393 &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 -08001394 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001395 &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 -08001396 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1397 &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.
1398 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1399 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1400 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1401 &quot;sslCipher&quot;: &quot;A String&quot;, # A list of permissible ciphers to use for SSL encryption.
1402 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1403 &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 -08001404 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001405 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001406 &quot;replicaNames&quot;: [ # The replicas of the instance.
1407 &quot;A String&quot;,
1408 ],
1409 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001410 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001411 &quot;scheduledMaintenance&quot;: { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance.
1412 &quot;canDefer&quot;: True or False,
1413 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001414 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001415 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1416 },
1417 &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.
1418 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1419 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1420 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1421 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1422 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1423 &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*
1424 &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*.
1425 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1426 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1427 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1428 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1429 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001430 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001431 &quot;settings&quot;: { # Database instance settings. # The user settings.
1432 &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.
1433 &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.
1434 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
1435 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
1436 },
1437 &quot;authorizedGaeApplications&quot;: [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.
1438 &quot;A String&quot;,
1439 ],
1440 &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.
1441 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1442 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1443 &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.
1444 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1445 },
1446 &quot;binaryLogEnabled&quot;: True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.
1447 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1448 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1449 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001450 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001451 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1452 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1453 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1454 },
1455 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1456 &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.
1457 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1458 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1459 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1460 { # Database flags for Cloud SQL instances.
1461 &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.
1462 &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.
1463 },
1464 ],
1465 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1466 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1467 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1468 &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
1469 &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
1470 &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
1471 },
1472 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001473 &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.
1474 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001475 &quot;queryPlansPerMinute&quot;: 42, # Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001476 &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 -08001477 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1478 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1479 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001480 &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.
1481 &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*).
1482 { # An entry for an Access Control list.
1483 &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*.
1484 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1485 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1486 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1487 },
1488 ],
1489 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1490 &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.
1491 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1492 },
1493 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1494 &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.
1495 &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.
1496 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1497 &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.
1498 &quot;zone&quot;: &quot;A String&quot;, # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.).
1499 },
1500 &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.
1501 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1502 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1503 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1504 &quot;updateTrack&quot;: &quot;A String&quot;, # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more.
1505 },
1506 &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.
1507 &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.
1508 &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.
1509 &quot;storageAutoResize&quot;: True or False, # Configuration to increase storage size automatically. The default value is true.
1510 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001511 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001512 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1513 &quot;a_key&quot;: &quot;A String&quot;,
1514 },
1515 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001516 &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 -08001517 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1518 &quot;A String&quot;,
1519 ],
1520 },
1521 ],
1522 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesList*.
1523 &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.
1524 &quot;warnings&quot;: [ # List of warnings that occurred while handling the request.
1525 { # An Admin API warning message.
1526 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
1527 &quot;message&quot;: &quot;A String&quot;, # The warning message.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001528 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001529 },
1530 ],
1531}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001532</div>
1533
1534<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001535 <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001536 <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 -07001537
1538Args:
1539 project: string, Project ID of the project that contains the instance. (required)
1540 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001541 x__xgafv: string, V1 error format.
1542 Allowed values
1543 1 - v1 error format
1544 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001545
1546Returns:
1547 An object of the form:
1548
1549 { # Instances ListServerCas response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001550 &quot;activeVersion&quot;: &quot;A String&quot;,
1551 &quot;certs&quot;: [ # List of server CA certificates for the instance.
1552 { # SslCerts Resource
1553 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1554 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1555 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1556 &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*
1557 &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*.
1558 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1559 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1560 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1561 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1562 },
1563 ],
1564 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instancesListServerCas*.
1565}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001566</div>
1567
1568<div class="method">
1569 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1570 <pre>Retrieves the next page of results.
1571
1572Args:
1573 previous_request: The request for the previous page. (required)
1574 previous_response: The response from the request for the previous page. (required)
1575
1576Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -08001578 page. Returns None if there are no more items in the collection.
1579 </pre>
1580</div>
1581
1582<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001583 <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001584 <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -08001585
1586Args:
1587 project: string, Project ID of the project that contains the instance. (required)
1588 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001589 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08001590 The object takes the form of:
1591
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001592{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001593 &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 -08001594 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
1595 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001596 &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*, *POSTGRES_12*, or *POSTGRES_13* (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 -08001597 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
1598 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
1599 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
1600 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001601 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
1602 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
1603 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
1604 },
1605 &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.
1606 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
1607 &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.
1608 &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.
1609 },
1610 &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.
1611 &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.
1612 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
1613 { # Database instance IP Mapping.
1614 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
1615 &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.
1616 &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.
1617 },
1618 ],
1619 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
1620 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
1621 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
1622 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001623 &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 -08001624 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
1625 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
1626 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1627 &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.
1628 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
1629 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
1630 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
1631 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
1632 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
1633 },
yoshi-code-bot36591372021-06-16 00:22:06 -07001634 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
1635 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
1636 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -07001637 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001638 &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.
1639 &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 -08001640 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
1641 &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 -08001642 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001643 &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 -08001644 &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 -08001645 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
1646 &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 -08001647 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
1648 &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 -08001649 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
1650 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
1651 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
1652 &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 -08001653 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
1654 &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 -08001655 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001656 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001657 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001658 &quot;A String&quot;,
1659 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001660 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001661 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001662 &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 -08001663 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001664 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001665 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001666 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
1667 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001668 &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.
1669 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1670 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
1671 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
1672 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
1673 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
1674 &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*
1675 &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*.
1676 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
1677 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
1678 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1679 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
1680 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001681 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001682 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001683 &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 -08001684 &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 -08001685 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001686 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001687 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001688 &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 -08001689 &quot;A String&quot;,
1690 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001691 &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 -08001692 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
1693 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
1694 &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.
1695 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
1696 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001697 &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 -08001698 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
1699 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
1700 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07001701 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001702 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
1703 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
1704 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
1705 },
1706 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
1707 &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.
1708 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
1709 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
1710 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
1711 { # Database flags for Cloud SQL instances.
1712 &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.
1713 &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.
1714 },
1715 ],
1716 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
1717 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
1718 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
1719 &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
1720 &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
1721 &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
1722 },
1723 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001724 &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.
1725 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001726 &quot;queryPlansPerMinute&quot;: 42, # Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001727 &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 -08001728 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
1729 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
1730 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001731 &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.
1732 &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*).
1733 { # An entry for an Access Control list.
1734 &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*.
1735 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
1736 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
1737 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
1738 },
1739 ],
1740 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
1741 &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.
1742 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
1743 },
1744 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
1745 &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.
1746 &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.
1747 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
1748 &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.
1749 &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 -08001750 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001751 &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.
1752 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
1753 &quot;hour&quot;: 42, # hour of day - 0 to 23.
1754 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
1755 &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 -08001756 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001757 &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.
1758 &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.
1759 &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.
1760 &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 -08001761 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001762 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001763 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
1764 &quot;a_key&quot;: &quot;A String&quot;,
1765 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001766 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001767 &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 -08001768 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
1769 &quot;A String&quot;,
1770 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001771}
Craig Citroe633be12015-03-02 13:40:36 -08001772
Dan O'Mearadd494642020-05-01 07:42:23 -07001773 x__xgafv: string, V1 error format.
1774 Allowed values
1775 1 - v1 error format
1776 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001777
1778Returns:
1779 An object of the form:
1780
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001781 { # 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 -08001782 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1783 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1784 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1785 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001786 &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*.
1787 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1788 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1789 { # Database instance operation error.
1790 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1791 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1792 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1793 },
1794 ],
1795 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1796 },
1797 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001798 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001799 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001800 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001801 &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 -08001802 &quot;A String&quot;,
1803 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001804 &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 -08001805 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1806 &quot;offload&quot;: True or False, # Option for export offload.
1807 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1808 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001809 &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 -08001810 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001811 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1812 &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 -08001813 &quot;A String&quot;,
1814 ],
1815 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001816 &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 -08001817 },
1818 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1819 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1820 &quot;encryptionOptions&quot;: {
1821 &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.
1822 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1823 &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 -08001824 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001825 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001826 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1827 &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.
1828 &quot;A String&quot;,
1829 ],
1830 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1831 },
1832 &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.
1833 &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.
1834 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1835 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001836 &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 -08001837 },
1838 &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*.
1839 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1840 &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.
1841 &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*
1842 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1843 &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*.
1844 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1845 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1846 &quot;targetLink&quot;: &quot;A String&quot;,
1847 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1848 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1849}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001850</div>
1851
1852<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001853 <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001854 <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 -08001855
1856Args:
1857 project: string, ID of the project that contains the read replica. (required)
1858 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001859 x__xgafv: string, V1 error format.
1860 Allowed values
1861 1 - v1 error format
1862 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001863
1864Returns:
1865 An object of the form:
1866
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001867 { # 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 -08001868 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1869 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1870 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1871 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001872 &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*.
1873 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1874 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1875 { # Database instance operation error.
1876 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1877 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1878 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1879 },
1880 ],
1881 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1882 },
1883 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001884 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001885 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001886 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001887 &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 -08001888 &quot;A String&quot;,
1889 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001890 &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 -08001891 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1892 &quot;offload&quot;: True or False, # Option for export offload.
1893 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1894 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001895 &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 -08001896 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001897 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1898 &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 -08001899 &quot;A String&quot;,
1900 ],
1901 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001902 &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 -08001903 },
1904 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1905 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1906 &quot;encryptionOptions&quot;: {
1907 &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.
1908 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1909 &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 -08001910 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001911 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001912 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1913 &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.
1914 &quot;A String&quot;,
1915 ],
1916 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
1917 },
1918 &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.
1919 &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.
1920 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
1921 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001922 &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 -08001923 },
1924 &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*.
1925 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
1926 &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.
1927 &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*
1928 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
1929 &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*.
1930 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
1931 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
1932 &quot;targetLink&quot;: &quot;A String&quot;,
1933 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
1934 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
1935}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001936</div>
1937
1938<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001939 <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001940 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance.
Craig Citroe633be12015-03-02 13:40:36 -08001941
1942Args:
1943 project: string, Project ID of the project that contains the instance. (required)
1944 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001945 x__xgafv: string, V1 error format.
1946 Allowed values
1947 1 - v1 error format
1948 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08001949
1950Returns:
1951 An object of the form:
1952
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001953 { # 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 -08001954 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
1955 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
1956 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
1957 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001958 &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*.
1959 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
1960 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
1961 { # Database instance operation error.
1962 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
1963 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
1964 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
1965 },
1966 ],
1967 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
1968 },
1969 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001970 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001971 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001972 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001973 &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 -08001974 &quot;A String&quot;,
1975 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001976 &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 -08001977 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
1978 &quot;offload&quot;: True or False, # Option for export offload.
1979 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
1980 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001981 &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 -08001982 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001983 &quot;schemaOnly&quot;: True or False, # Export only schemas.
1984 &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 -08001985 &quot;A String&quot;,
1986 ],
1987 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001988 &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 -08001989 },
1990 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
1991 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
1992 &quot;encryptionOptions&quot;: {
1993 &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.
1994 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
1995 &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 -08001996 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001997 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001998 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
1999 &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.
2000 &quot;A String&quot;,
2001 ],
2002 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2003 },
2004 &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.
2005 &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.
2006 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2007 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002008 &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 -08002009 },
2010 &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*.
2011 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2012 &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.
2013 &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*
2014 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2015 &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*.
2016 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2017 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2018 &quot;targetLink&quot;: &quot;A String&quot;,
2019 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2020 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2021}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002022</div>
2023
2024<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002025 <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002026 <pre>Restarts a Cloud SQL instance.
2027
2028Args:
2029 project: string, Project ID of the project that contains the instance to be restarted. (required)
2030 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002031 x__xgafv: string, V1 error format.
2032 Allowed values
2033 1 - v1 error format
2034 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002035
2036Returns:
2037 An object of the form:
2038
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002039 { # 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 -08002040 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2041 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2042 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2043 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002044 &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*.
2045 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2046 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2047 { # Database instance operation error.
2048 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2049 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2050 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2051 },
2052 ],
2053 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2054 },
2055 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002056 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002057 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002058 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002059 &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 -08002060 &quot;A String&quot;,
2061 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002062 &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 -08002063 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2064 &quot;offload&quot;: True or False, # Option for export offload.
2065 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2066 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002067 &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 -08002068 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002069 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2070 &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 -08002071 &quot;A String&quot;,
2072 ],
2073 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002074 &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 -08002075 },
2076 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2077 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2078 &quot;encryptionOptions&quot;: {
2079 &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.
2080 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2081 &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 -08002082 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002083 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002084 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2085 &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.
2086 &quot;A String&quot;,
2087 ],
2088 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2089 },
2090 &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.
2091 &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.
2092 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2093 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002094 &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 -08002095 },
2096 &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*.
2097 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2098 &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.
2099 &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*
2100 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2101 &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*.
2102 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2103 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2104 &quot;targetLink&quot;: &quot;A String&quot;,
2105 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2106 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2107}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002108</div>
2109
2110<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002111 <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002112 <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 -08002113
2114Args:
2115 project: string, Project ID of the project that contains the instance. (required)
2116 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002117 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002118 The object takes the form of:
2119
2120{ # Database instance restore backup request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002121 &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.
2122 &quot;backupRunId&quot;: &quot;A String&quot;, # The ID of the backup run to restore from.
2123 &quot;instanceId&quot;: &quot;A String&quot;, # The ID of the instance that the backup was taken from.
2124 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#restoreBackupContext*.
2125 &quot;project&quot;: &quot;A String&quot;, # The full project ID of the source instance.
2126 },
2127}
Craig Citroe633be12015-03-02 13:40:36 -08002128
Dan O'Mearadd494642020-05-01 07:42:23 -07002129 x__xgafv: string, V1 error format.
2130 Allowed values
2131 1 - v1 error format
2132 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002133
2134Returns:
2135 An object of the form:
2136
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002137 { # 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 -08002138 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2139 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2140 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2141 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002142 &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*.
2143 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2144 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2145 { # Database instance operation error.
2146 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2147 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2148 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2149 },
2150 ],
2151 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2152 },
2153 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002154 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002155 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002156 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002157 &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 -08002158 &quot;A String&quot;,
2159 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002160 &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 -08002161 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2162 &quot;offload&quot;: True or False, # Option for export offload.
2163 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2164 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002165 &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 -08002166 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002167 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2168 &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 -08002169 &quot;A String&quot;,
2170 ],
2171 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002172 &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 -08002173 },
2174 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2175 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2176 &quot;encryptionOptions&quot;: {
2177 &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.
2178 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2179 &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 -08002180 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002181 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002182 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2183 &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.
2184 &quot;A String&quot;,
2185 ],
2186 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2187 },
2188 &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.
2189 &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.
2190 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2191 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002192 &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 -08002193 },
2194 &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*.
2195 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2196 &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.
2197 &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*
2198 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2199 &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*.
2200 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2201 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2202 &quot;targetLink&quot;: &quot;A String&quot;,
2203 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2204 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2205}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002206</div>
2207
2208<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002209 <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002210 <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 -07002211
2212Args:
2213 project: string, Project ID of the project that contains the instance. (required)
2214 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002215 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002216 The object takes the form of:
2217
2218{ # Rotate Server CA request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002219 &quot;rotateServerCaContext&quot;: { # Instance rotate server CA context. # Contains details about the rotate server CA operation.
2220 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#rotateServerCaContext*.
2221 &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.
2222 },
2223}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002224
Dan O'Mearadd494642020-05-01 07:42:23 -07002225 x__xgafv: string, V1 error format.
2226 Allowed values
2227 1 - v1 error format
2228 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002229
2230Returns:
2231 An object of the form:
2232
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002233 { # 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 -08002234 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2235 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2236 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2237 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002238 &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*.
2239 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2240 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2241 { # Database instance operation error.
2242 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2243 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2244 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2245 },
2246 ],
2247 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2248 },
2249 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002250 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002251 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002252 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002253 &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 -08002254 &quot;A String&quot;,
2255 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002256 &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 -08002257 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2258 &quot;offload&quot;: True or False, # Option for export offload.
2259 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2260 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002261 &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 -08002262 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002263 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2264 &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 -08002265 &quot;A String&quot;,
2266 ],
2267 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002268 &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 -08002269 },
2270 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2271 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2272 &quot;encryptionOptions&quot;: {
2273 &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.
2274 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2275 &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 -08002276 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002277 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002278 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2279 &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.
2280 &quot;A String&quot;,
2281 ],
2282 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2283 },
2284 &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.
2285 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
2286 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2287 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002288 &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 -08002289 },
2290 &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*.
2291 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2292 &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.
2293 &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*
2294 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2295 &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*.
2296 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2297 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2298 &quot;targetLink&quot;: &quot;A String&quot;,
2299 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2300 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2301}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002302</div>
2303
2304<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002305 <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002306 <pre>Starts the replication in the read replica instance.
2307
2308Args:
2309 project: string, ID of the project that contains the read replica. (required)
2310 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002311 x__xgafv: string, V1 error format.
2312 Allowed values
2313 1 - v1 error format
2314 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002315
2316Returns:
2317 An object of the form:
2318
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002319 { # 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 -08002320 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2321 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2322 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2323 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002324 &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*.
2325 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2326 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2327 { # Database instance operation error.
2328 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2329 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2330 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2331 },
2332 ],
2333 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2334 },
2335 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002336 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002337 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002338 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002339 &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 -08002340 &quot;A String&quot;,
2341 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002342 &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 -08002343 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2344 &quot;offload&quot;: True or False, # Option for export offload.
2345 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2346 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002347 &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 -08002348 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002349 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2350 &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 -08002351 &quot;A String&quot;,
2352 ],
2353 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002354 &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 -08002355 },
2356 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2357 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2358 &quot;encryptionOptions&quot;: {
2359 &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.
2360 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2361 &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 -08002362 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002363 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002364 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2365 &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.
2366 &quot;A String&quot;,
2367 ],
2368 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2369 },
2370 &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.
2371 &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.
2372 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2373 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002374 &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 -08002375 },
2376 &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*.
2377 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2378 &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.
2379 &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*
2380 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2381 &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*.
2382 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2383 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2384 &quot;targetLink&quot;: &quot;A String&quot;,
2385 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2386 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2387}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002388</div>
2389
2390<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002391 <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08002392 <pre>Stops the replication in the read replica instance.
2393
2394Args:
2395 project: string, ID of the project that contains the read replica. (required)
2396 instance: string, Cloud SQL read replica instance name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002397 x__xgafv: string, V1 error format.
2398 Allowed values
2399 1 - v1 error format
2400 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002401
2402Returns:
2403 An object of the form:
2404
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002405 { # 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 -08002406 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2407 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2408 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2409 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002410 &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*.
2411 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2412 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2413 { # Database instance operation error.
2414 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2415 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2416 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2417 },
2418 ],
2419 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2420 },
2421 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002422 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002423 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002424 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002425 &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 -08002426 &quot;A String&quot;,
2427 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002428 &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 -08002429 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2430 &quot;offload&quot;: True or False, # Option for export offload.
2431 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2432 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002433 &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 -08002434 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002435 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2436 &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 -08002437 &quot;A String&quot;,
2438 ],
2439 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002440 &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 -08002441 },
2442 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2443 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2444 &quot;encryptionOptions&quot;: {
2445 &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.
2446 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2447 &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 -08002448 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002449 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002450 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2451 &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.
2452 &quot;A String&quot;,
2453 ],
2454 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2455 },
2456 &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.
2457 &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.
2458 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2459 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002460 &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 -08002461 },
2462 &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*.
2463 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2464 &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.
2465 &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*
2466 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2467 &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*.
2468 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2469 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2470 &quot;targetLink&quot;: &quot;A String&quot;,
2471 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2472 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2473}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002474</div>
2475
2476<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002477 <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code>
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002478 <pre>Truncate MySQL general and slow query log tables MySQL only.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002479
2480Args:
2481 project: string, Project ID of the Cloud SQL project. (required)
2482 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002483 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002484 The object takes the form of:
2485
2486{ # Instance truncate log request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002487 &quot;truncateLogContext&quot;: { # Database Instance truncate log context. # Contains details about the truncate log operation.
2488 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#truncateLogContext*.
2489 &quot;logType&quot;: &quot;A String&quot;, # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*.
2490 },
2491}
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002492
Dan O'Mearadd494642020-05-01 07:42:23 -07002493 x__xgafv: string, V1 error format.
2494 Allowed values
2495 1 - v1 error format
2496 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002497
2498Returns:
2499 An object of the form:
2500
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002501 { # 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 -08002502 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2503 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2504 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2505 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002506 &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*.
2507 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2508 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2509 { # Database instance operation error.
2510 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2511 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2512 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2513 },
2514 ],
2515 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2516 },
2517 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002518 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002519 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002520 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002521 &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 -08002522 &quot;A String&quot;,
2523 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002524 &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 -08002525 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2526 &quot;offload&quot;: True or False, # Option for export offload.
2527 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2528 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002529 &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 -08002530 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002531 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2532 &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 -08002533 &quot;A String&quot;,
2534 ],
2535 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002536 &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 -08002537 },
2538 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2539 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2540 &quot;encryptionOptions&quot;: {
2541 &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.
2542 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2543 &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 -08002544 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002545 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002546 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2547 &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.
2548 &quot;A String&quot;,
2549 ],
2550 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2551 },
2552 &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.
2553 &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.
2554 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2555 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002556 &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 -08002557 },
2558 &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*.
2559 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2560 &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.
2561 &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*
2562 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2563 &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*.
2564 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2565 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2566 &quot;targetLink&quot;: &quot;A String&quot;,
2567 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2568 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2569}</pre>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002570</div>
2571
2572<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002573 <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002574 <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
Craig Citroe633be12015-03-02 13:40:36 -08002575
2576Args:
2577 project: string, Project ID of the project that contains the instance. (required)
2578 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002579 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08002580 The object takes the form of:
2581
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002582{ # A Cloud SQL instance resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002583 &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 -08002584 &quot;connectionName&quot;: &quot;A String&quot;, # Connection name of the Cloud SQL instance used in connection strings.
2585 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04002586 &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*, *POSTGRES_12*, or *POSTGRES_13* (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 -08002587 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances.
2588 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionConfiguration*.
2589 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
2590 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002591 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances.
2592 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#diskEncryptionStatus*.
2593 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
2594 },
2595 &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.
2596 &quot;failoverReplica&quot;: { # The name and status of the failover replica. This property is applicable only to Second Generation instances.
2597 &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.
2598 &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.
2599 },
2600 &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.
2601 &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.
2602 &quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
2603 { # Database instance IP Mapping.
2604 &quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
2605 &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.
2606 &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.
2607 },
2608 ],
2609 &quot;ipv6Address&quot;: &quot;A String&quot;, # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
2610 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#instance*.
2611 &quot;masterInstanceName&quot;: &quot;A String&quot;, # The name of the instance which will act as primary in the replication setup.
2612 &quot;maxDiskSize&quot;: &quot;A String&quot;, # The maximum disk size of the instance in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002613 &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 -08002614 &quot;onPremisesConfiguration&quot;: { # On-premises instance configuration. # Configuration specific to on-premises instances.
2615 &quot;caCertificate&quot;: &quot;A String&quot;, # PEM representation of the trusted CA&#x27;s x509 certificate.
2616 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2617 &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.
2618 &quot;dumpFilePath&quot;: &quot;A String&quot;, # The dump file to create the Cloud SQL replica.
2619 &quot;hostPort&quot;: &quot;A String&quot;, # The host and port of the on-premises instance in host:port format
2620 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#onPremisesConfiguration*.
2621 &quot;password&quot;: &quot;A String&quot;, # The password for connecting to on-premises instance.
2622 &quot;username&quot;: &quot;A String&quot;, # The username for connecting to on-premises instance.
2623 },
yoshi-code-bot36591372021-06-16 00:22:06 -07002624 &quot;outOfDiskReport&quot;: { # This message wraps up the information written by out-of-disk detection job. # This field represents the report generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
2625 &quot;sqlMinRecommendedIncreaseSizeGb&quot;: 42, # The minimum recommended increase size in GigaBytes This field is consumed by the frontend Writers: -- the proactive database wellness job for OOD.
2626 &quot;sqlOutOfDiskState&quot;: &quot;A String&quot;, # This field represents the state generated by the proactive database wellness job for OutOfDisk issues. Writers: -- the proactive database wellness job for OOD. Readers: -- the proactive database wellness job
yoshi-code-bot64143a02021-04-27 05:08:04 -07002627 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002628 &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.
2629 &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 -08002630 &quot;replicaConfiguration&quot;: { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas.
2631 &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 -08002632 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#replicaConfiguration*.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002633 &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 -08002634 &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 -08002635 &quot;clientCertificate&quot;: &quot;A String&quot;, # PEM representation of the replica&#x27;s x509 certificate.
2636 &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 -08002637 &quot;connectRetryInterval&quot;: 42, # Seconds to wait between connect retries. MySQL&#x27;s default is 60 seconds.
2638 &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 -08002639 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#mysqlReplicaConfiguration*.
2640 &quot;masterHeartbeatPeriod&quot;: &quot;A String&quot;, # Interval in milliseconds between replication heartbeats.
2641 &quot;password&quot;: &quot;A String&quot;, # The password for the replication connection.
2642 &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 -08002643 &quot;username&quot;: &quot;A String&quot;, # The username for the replication connection.
2644 &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 -08002645 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002646 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002647 &quot;replicaNames&quot;: [ # The replicas of the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002648 &quot;A String&quot;,
2649 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002650 &quot;rootPassword&quot;: &quot;A String&quot;, # Initial root password. Use only on creation.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002651 &quot;satisfiesPzs&quot;: True or False, # The status indicating if instance satisfiesPzs. Reserved for future use.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002652 &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 -08002653 &quot;canDefer&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002654 &quot;canReschedule&quot;: True or False, # If the scheduled maintenance can be rescheduled.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07002655 &quot;scheduleDeadlineTime&quot;: &quot;A String&quot;, # Maintenance cannot be rescheduled to start beyond this deadline.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002656 &quot;startTime&quot;: &quot;A String&quot;, # The start time of any upcoming scheduled maintenance for this instance.
2657 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002658 &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.
2659 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2660 &quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
2661 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
2662 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
2663 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
2664 &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*
2665 &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*.
2666 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
2667 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#sslCert*.
2668 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2669 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
2670 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07002671 &quot;serviceAccountEmailAddress&quot;: &quot;A String&quot;, # The service account email address assigned to the instance. This property is read-only.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002672 &quot;settings&quot;: { # Database instance settings. # The user settings.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002673 &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 -08002674 &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 -08002675 &quot;domain&quot;: &quot;A String&quot;, # The name of the domain (e.g., mydomain.com).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002676 &quot;kind&quot;: &quot;A String&quot;, # This is always sql#activeDirectoryConfig.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002677 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002678 &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 -08002679 &quot;A String&quot;,
2680 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002681 &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 -08002682 &quot;backupConfiguration&quot;: { # Database instance backup configuration. # The daily backup configuration for the instance.
2683 &quot;backupRetentionSettings&quot;: { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings.
2684 &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.
2685 &quot;retentionUnit&quot;: &quot;A String&quot;, # The unit that &#x27;retained_backups&#x27; represents.
2686 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002687 &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 -08002688 &quot;enabled&quot;: True or False, # Whether this configuration is enabled.
2689 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupConfiguration*.
2690 &quot;location&quot;: &quot;A String&quot;, # Location of the backup
yoshi-code-bot1a4514d2021-07-13 00:20:24 -07002691 &quot;pointInTimeRecoveryEnabled&quot;: True or False, # (Postgres only) Whether point in time recovery is enabled.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002692 &quot;replicationLogArchivingEnabled&quot;: True or False, # Reserved for future use.
2693 &quot;startTime&quot;: &quot;A String&quot;, # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*.
2694 &quot;transactionLogRetentionDays&quot;: 42, # The number of days of transaction logs we retain for point in time restore, from 1-7.
2695 },
2696 &quot;collation&quot;: &quot;A String&quot;, # The name of server Instance collation.
2697 &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.
2698 &quot;dataDiskSizeGb&quot;: &quot;A String&quot;, # The size of data disk, in GB. The data disk size minimum is 10GB.
2699 &quot;dataDiskType&quot;: &quot;A String&quot;, # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.
2700 &quot;databaseFlags&quot;: [ # The database flags passed to the instance at startup.
2701 { # Database flags for Cloud SQL instances.
2702 &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.
2703 &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.
2704 },
2705 ],
2706 &quot;databaseReplicationEnabled&quot;: True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not.
2707 &quot;denyMaintenancePeriods&quot;: [ # Deny maintenance periods
2708 { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.
2709 &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
2710 &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
2711 &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
2712 },
2713 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002714 &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.
2715 &quot;queryInsightsEnabled&quot;: True or False, # Whether Query Insights feature is enabled.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07002716 &quot;queryPlansPerMinute&quot;: 42, # Number of query plans generated by Insights per minute. Default is 5. Changing this will restart the database.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002717 &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 -08002718 &quot;recordApplicationTags&quot;: True or False, # Whether Query Insights will record application tags from query when enabled.
2719 &quot;recordClientAddress&quot;: True or False, # Whether Query Insights will record client address when enabled.
2720 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002721 &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.
2722 &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*).
2723 { # An entry for an Access Control list.
2724 &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*.
2725 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#aclEntry*.
2726 &quot;name&quot;: &quot;A String&quot;, # Optional. A label to identify this entry.
2727 &quot;value&quot;: &quot;A String&quot;, # The allowlisted value for the access control list.
2728 },
2729 ],
2730 &quot;ipv4Enabled&quot;: True or False, # Whether the instance is assigned a public IP address or not.
2731 &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.
2732 &quot;requireSsl&quot;: True or False, # Whether SSL connections over IP are enforced or not.
2733 },
2734 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#settings*.
2735 &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.
2736 &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.
2737 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#locationPreference*.
2738 &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.
2739 &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 -08002740 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002741 &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.
2742 &quot;day&quot;: 42, # day of week (1-7), starting on Monday.
2743 &quot;hour&quot;: 42, # hour of day - 0 to 23.
2744 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#maintenanceWindow*.
2745 &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 -08002746 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002747 &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.
2748 &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.
2749 &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.
2750 &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 -08002751 &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.
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04002752 &quot;tier&quot;: &quot;A String&quot;, # The tier (or machine type) for this instance, for example *db-custom-1-3840* .
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002753 &quot;userLabels&quot;: { # User-provided labels, represented as a dictionary where each label is a single key value pair.
2754 &quot;a_key&quot;: &quot;A String&quot;,
2755 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002756 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002757 &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 -08002758 &quot;suspensionReason&quot;: [ # If the instance state is SUSPENDED, the reason for the suspension.
2759 &quot;A String&quot;,
2760 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002761}
Craig Citroe633be12015-03-02 13:40:36 -08002762
Dan O'Mearadd494642020-05-01 07:42:23 -07002763 x__xgafv: string, V1 error format.
2764 Allowed values
2765 1 - v1 error format
2766 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -08002767
2768Returns:
2769 An object of the form:
2770
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002771 { # 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 -08002772 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
2773 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
2774 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#backupContext*.
2775 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002776 &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*.
2777 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
2778 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
2779 { # Database instance operation error.
2780 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
2781 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
2782 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
2783 },
2784 ],
2785 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
2786 },
2787 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002788 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002789 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08002790 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002791 &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 -08002792 &quot;A String&quot;,
2793 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002794 &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 -08002795 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
2796 &quot;offload&quot;: True or False, # Option for export offload.
2797 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
2798 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002799 &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 -08002800 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002801 &quot;schemaOnly&quot;: True or False, # Export only schemas.
2802 &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 -08002803 &quot;A String&quot;,
2804 ],
2805 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002806 &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 -08002807 },
2808 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
2809 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
2810 &quot;encryptionOptions&quot;: {
2811 &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.
2812 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
2813 &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 -08002814 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002815 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002816 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
2817 &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.
2818 &quot;A String&quot;,
2819 ],
2820 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
2821 },
2822 &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.
2823 &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.
2824 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
2825 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002826 &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 -08002827 },
2828 &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*.
2829 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
2830 &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.
2831 &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*
2832 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
2833 &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*.
2834 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
2835 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
2836 &quot;targetLink&quot;: &quot;A String&quot;,
2837 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
2838 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
2839}</pre>
Craig Citroe633be12015-03-02 13:40:36 -08002840</div>
2841
2842</body></html>