blob: fd3459c166ab17fc6e8088577548d291cf918201 [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.databases.html">databases</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="#delete">delete(project, instance, database, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070079<p class="firstline">Deletes a database from a Cloud SQL instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -080080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#get">get(project, instance, database, x__xgafv=None)</a></code></p>
82<p class="firstline">Retrieves a resource containing information about a database inside a Cloud</p>
Craig Citroe633be12015-03-02 13:40:36 -080083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Inserts a resource containing information about a database inside a Cloud</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="#list">list(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Lists databases in the specified Cloud SQL instance.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#patch">patch(project, instance, database, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Partially updates a resource containing information about a database inside</p>
Craig Citroe633be12015-03-02 13:40:36 -080092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#update">update(project, instance, database, body=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates a resource containing information about a database inside a Cloud</p>
Craig Citroe633be12015-03-02 13:40:36 -080095<h3>Method Details</h3>
96<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code class="details" id="delete">delete(project, instance, database, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070098 <pre>Deletes a database from a Cloud SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -080099
100Args:
101 project: string, Project ID of the project that contains the instance. (required)
102 instance: string, Database instance ID. This does not include the project ID. (required)
103 database: string, Name of the database to be deleted in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700104 x__xgafv: string, V1 error format.
105 Allowed values
106 1 - v1 error format
107 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800108
109Returns:
110 An object of the form:
111
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 { # An Operation resource.&amp;nbsp;For successful operations that return an
113 # Operation resource, only the fields relevant to the operation are populated
114 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700115 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
116 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
117 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
118 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
119 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
120 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
121 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
122 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
123 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
124 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
125 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
126 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
127 &quot;targetLink&quot;: &quot;A String&quot;,
128 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
129 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
130 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
131 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
132 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
133 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
134 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
135 # populated.
136 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
137 { # Database instance operation error.
138 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
139 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
140 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 ],
143 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
144 },
145 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
146 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
147 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
148 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
149 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
150 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
151 # of the database table are loaded with CSV data.
152 &quot;A String&quot;,
153 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
157 # specify a database, and is overridden by any database specification in the
158 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
159 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700160 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
161 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
162 &quot;encryptionOptions&quot;: {
163 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
164 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
165 # write permissions to the bucket and read access to the file.
166 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
167 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
168 # write permissions to the bucket and read access to the file.
169 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
170 },
171 },
172 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 # &lt;code&gt;gs:
174 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
175 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
176 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
178 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800179 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
181 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
182 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
183 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700184 # identifier to retrieve the Operations resource that has information about
185 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700186 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
187 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
189 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
190 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
191 # either by using this property or by using the
192 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
193 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
194 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
195 # this database must match the one specified in the
196 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800198 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
200 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 # you specify tables, specify one and only one database. For PostgreSQL
202 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800204 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700205 &quot;schemaOnly&quot;: True or False, # Export only schemas.
206 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
207 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
209 # a CHANGE MASTER TO statement with the binary log coordinates.
210 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
211 # a SQL comment, and has no effect.
212 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 },
Craig Citroe633be12015-03-02 13:40:36 -0800214 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700215 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
216 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
217 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
218 # stored. The URI is in the form &lt;code&gt;gs:
219 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
220 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
221 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
222 # // compressed.
223 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
224 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
225 },
226 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800227 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800229 }</pre>
230</div>
231
232<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 <code class="details" id="get">get(project, instance, database, x__xgafv=None)</code>
234 <pre>Retrieves a resource containing information about a database inside a Cloud
235SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800236
237Args:
238 project: string, Project ID of the project that contains the instance. (required)
239 instance: string, Database instance ID. This does not include the project ID. (required)
240 database: string, Name of the database in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 x__xgafv: string, V1 error format.
242 Allowed values
243 1 - v1 error format
244 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800245
246Returns:
247 An object of the form:
248
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 { # Represents a SQL database on the Cloud SQL instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
251 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
Dan O'Mearadd494642020-05-01 07:42:23 -0700252 # the project ID or instance name.
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
254 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 # apps domain is prefixed if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
257 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
258 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
259 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
260 },
261 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
262 &quot;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
263 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700264 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800265 }</pre>
266</div>
267
268<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700269 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
270 <pre>Inserts a resource containing information about a database inside a Cloud
271SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800272
273Args:
274 project: string, Project ID of the project that contains the instance. (required)
275 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700276 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800277 The object takes the form of:
278
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700279{ # Represents a SQL database on the Cloud SQL instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
281 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
Dan O'Mearadd494642020-05-01 07:42:23 -0700282 # the project ID or instance name.
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
284 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700285 # apps domain is prefixed if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
287 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
288 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
289 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
290 },
291 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
292 &quot;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
293 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700294 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800295 }
296
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 x__xgafv: string, V1 error format.
298 Allowed values
299 1 - v1 error format
300 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800301
302Returns:
303 An object of the form:
304
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 { # An Operation resource.&amp;nbsp;For successful operations that return an
306 # Operation resource, only the fields relevant to the operation are populated
307 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
309 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
310 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
311 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
312 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
313 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
314 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
315 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
316 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
317 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
318 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
319 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
320 &quot;targetLink&quot;: &quot;A String&quot;,
321 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
322 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
323 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
324 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
325 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
326 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
327 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
328 # populated.
329 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
330 { # Database instance operation error.
331 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
332 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
333 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700334 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700335 ],
336 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
337 },
338 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
339 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
340 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
341 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
342 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
343 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
344 # of the database table are loaded with CSV data.
345 &quot;A String&quot;,
346 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700347 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700348 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
350 # specify a database, and is overridden by any database specification in the
351 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
352 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
354 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
355 &quot;encryptionOptions&quot;: {
356 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
357 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
358 # write permissions to the bucket and read access to the file.
359 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
360 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
361 # write permissions to the bucket and read access to the file.
362 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
363 },
364 },
365 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 # &lt;code&gt;gs:
367 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
368 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
369 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
371 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800372 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
374 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
375 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
376 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700377 # identifier to retrieve the Operations resource that has information about
378 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
380 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
382 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
383 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
384 # either by using this property or by using the
385 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
386 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
387 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
388 # this database must match the one specified in the
389 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700390 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800391 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
393 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700394 # you specify tables, specify one and only one database. For PostgreSQL
395 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800397 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 &quot;schemaOnly&quot;: True or False, # Export only schemas.
399 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
400 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700401 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
402 # a CHANGE MASTER TO statement with the binary log coordinates.
403 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
404 # a SQL comment, and has no effect.
405 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 },
Craig Citroe633be12015-03-02 13:40:36 -0800407 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700408 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
409 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
410 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
411 # stored. The URI is in the form &lt;code&gt;gs:
412 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
413 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
414 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
415 # // compressed.
416 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
417 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
418 },
419 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800420 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700421 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800422 }</pre>
423</div>
424
425<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700426 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800427 <pre>Lists databases in the specified Cloud SQL instance.
428
429Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 project: string, Project ID of the project that contains the instance. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800431 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 x__xgafv: string, V1 error format.
433 Allowed values
434 1 - v1 error format
435 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800436
437Returns:
438 An object of the form:
439
440 { # Database list response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700441 &quot;items&quot;: [ # List of database resources in the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 { # Represents a SQL database on the Cloud SQL instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
444 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
Dan O'Mearadd494642020-05-01 07:42:23 -0700445 # the project ID or instance name.
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
447 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700448 # apps domain is prefixed if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700449 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
450 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
451 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
452 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
453 },
454 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
455 &quot;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
456 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800458 },
459 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#databasesList&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800461 }</pre>
462</div>
463
464<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700465 <code class="details" id="patch">patch(project, instance, database, body=None, x__xgafv=None)</code>
466 <pre>Partially updates a resource containing information about a database inside
467a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -0800468
469Args:
470 project: string, Project ID of the project that contains the instance. (required)
471 instance: string, Database instance ID. This does not include the project ID. (required)
472 database: string, Name of the database to be updated in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700473 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800474 The object takes the form of:
475
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476{ # Represents a SQL database on the Cloud SQL instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
478 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
Dan O'Mearadd494642020-05-01 07:42:23 -0700479 # the project ID or instance name.
Bu Sun Kim65020912020-05-20 12:08:20 -0700480 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
481 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 # apps domain is prefixed if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
484 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
485 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
486 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
487 },
488 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
489 &quot;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
490 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700491 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800492 }
493
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 x__xgafv: string, V1 error format.
495 Allowed values
496 1 - v1 error format
497 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800498
499Returns:
500 An object of the form:
501
Dan O'Mearadd494642020-05-01 07:42:23 -0700502 { # An Operation resource.&amp;nbsp;For successful operations that return an
503 # Operation resource, only the fields relevant to the operation are populated
504 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
506 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
507 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
508 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
509 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
510 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
511 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
512 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
513 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
514 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
515 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
516 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
517 &quot;targetLink&quot;: &quot;A String&quot;,
518 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
519 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
520 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
521 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
522 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
523 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
524 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
525 # populated.
526 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
527 { # Database instance operation error.
528 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
529 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
530 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 ],
533 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
534 },
535 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
536 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
537 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
538 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
539 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
540 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
541 # of the database table are loaded with CSV data.
542 &quot;A String&quot;,
543 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700544 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700546 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
547 # specify a database, and is overridden by any database specification in the
548 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
549 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
551 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
552 &quot;encryptionOptions&quot;: {
553 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
554 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
555 # write permissions to the bucket and read access to the file.
556 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
557 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
558 # write permissions to the bucket and read access to the file.
559 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
560 },
561 },
562 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 # &lt;code&gt;gs:
564 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
565 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
566 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700567 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
568 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800569 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700570 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
571 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
572 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
573 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700574 # identifier to retrieve the Operations resource that has information about
575 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
577 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700578 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
579 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
580 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
581 # either by using this property or by using the
582 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
583 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
584 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
585 # this database must match the one specified in the
586 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800588 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
590 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700591 # you specify tables, specify one and only one database. For PostgreSQL
592 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800594 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700595 &quot;schemaOnly&quot;: True or False, # Export only schemas.
596 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
597 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700598 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
599 # a CHANGE MASTER TO statement with the binary log coordinates.
600 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
601 # a SQL comment, and has no effect.
602 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 },
Craig Citroe633be12015-03-02 13:40:36 -0800604 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
606 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
607 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
608 # stored. The URI is in the form &lt;code&gt;gs:
609 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
610 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
611 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
612 # // compressed.
613 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
614 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
615 },
616 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800617 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800619 }</pre>
620</div>
621
622<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 <code class="details" id="update">update(project, instance, database, body=None, x__xgafv=None)</code>
624 <pre>Updates a resource containing information about a database inside a Cloud
625SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800626
627Args:
628 project: string, Project ID of the project that contains the instance. (required)
629 instance: string, Database instance ID. This does not include the project ID. (required)
630 database: string, Name of the database to be updated in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800632 The object takes the form of:
633
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634{ # Represents a SQL database on the Cloud SQL instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700635 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
636 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
Dan O'Mearadd494642020-05-01 07:42:23 -0700637 # the project ID or instance name.
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
639 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700640 # apps domain is prefixed if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700641 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
642 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
643 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
644 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
645 },
646 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
647 &quot;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
648 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700649 # API.
Craig Citroe633be12015-03-02 13:40:36 -0800650 }
651
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 x__xgafv: string, V1 error format.
653 Allowed values
654 1 - v1 error format
655 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800656
657Returns:
658 An object of the form:
659
Dan O'Mearadd494642020-05-01 07:42:23 -0700660 { # An Operation resource.&amp;nbsp;For successful operations that return an
661 # Operation resource, only the fields relevant to the operation are populated
662 # in the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
664 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
665 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
666 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
667 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
668 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
669 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
670 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
671 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
672 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
673 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
674 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
675 &quot;targetLink&quot;: &quot;A String&quot;,
676 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
677 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
678 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
679 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
680 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
681 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
682 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
683 # populated.
684 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
685 { # Database instance operation error.
686 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
687 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
688 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700689 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700690 ],
691 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
692 },
693 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
694 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
695 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
696 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
697 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
698 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
699 # of the database table are loaded with CSV data.
700 &quot;A String&quot;,
701 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700702 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700703 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
705 # specify a database, and is overridden by any database specification in the
706 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
707 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
709 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
710 &quot;encryptionOptions&quot;: {
711 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
712 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
713 # write permissions to the bucket and read access to the file.
714 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
715 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
716 # write permissions to the bucket and read access to the file.
717 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
718 },
719 },
720 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 # &lt;code&gt;gs:
722 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
723 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
724 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
726 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800727 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
729 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
730 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
731 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
Dan O'Mearadd494642020-05-01 07:42:23 -0700732 # identifier to retrieve the Operations resource that has information about
733 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700734 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
735 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
Dan O'Mearadd494642020-05-01 07:42:23 -0700736 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
737 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
738 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
739 # either by using this property or by using the
740 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
741 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
742 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
743 # this database must match the one specified in the
744 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700745 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800746 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
748 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
Dan O'Mearadd494642020-05-01 07:42:23 -0700749 # you specify tables, specify one and only one database. For PostgreSQL
750 # instances, you can specify only one table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700751 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800752 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 &quot;schemaOnly&quot;: True or False, # Export only schemas.
754 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
755 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
Dan O'Mearadd494642020-05-01 07:42:23 -0700756 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
757 # a CHANGE MASTER TO statement with the binary log coordinates.
758 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
759 # a SQL comment, and has no effect.
760 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700761 },
Craig Citroe633be12015-03-02 13:40:36 -0800762 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700763 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
764 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
765 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
766 # stored. The URI is in the form &lt;code&gt;gs:
767 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
768 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
769 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
770 # // compressed.
771 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
772 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
773 },
774 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800775 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800777 }</pre>
778</div>
779
780</body></html>