blob: 73f9adb5faf7d8efdd4932a5847574912bea7c13 [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;targetLink&quot;: &quot;A String&quot;,
116 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
117 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
118 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
119 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
120 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
121 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
122 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
123 # populated.
124 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
125 { # Database instance operation error.
126 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
127 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
128 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 ],
131 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
132 },
133 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
134 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 &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 -0700136 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
137 # specify a database, and is overridden by any database specification in the
138 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
139 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
141 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
142 &quot;encryptionOptions&quot;: {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700143 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
145 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
146 # write permissions to the bucket and read access to the file.
147 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
148 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
149 # write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 },
151 },
152 &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 -0700153 # &lt;code&gt;gs:
154 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
155 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
156 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &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
158 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700159 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
160 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
161 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
162 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
163 # of the database table are loaded with CSV data.
164 &quot;A String&quot;,
165 ],
166 },
Craig Citroe633be12015-03-02 13:40:36 -0800167 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
169 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
170 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
171 &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 -0700172 # identifier to retrieve the Operations resource that has information about
173 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700174 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700175 &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
176 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
177 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
178 # stored. The URI is in the form &lt;code&gt;gs:
179 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
180 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
181 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
182 # // compressed.
183 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
184 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
185 },
186 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 &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 },
215 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700217 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
218 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
219 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
220 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
221 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
222 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
223 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
224 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
225 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
226 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
227 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
228 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700250 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
251 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
252 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
253 # the project ID or instance name.
254 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
255 # apps domain is prefixed if applicable.
256 &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;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
262 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
263 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
264 # API.
265 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800266</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 Kim4ed7d3f2020-05-27 12:20:54 -0700280 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
281 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
282 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
283 # the project ID or instance name.
284 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
285 # apps domain is prefixed if applicable.
286 &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;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
292 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
293 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
294 # API.
295}
Craig Citroe633be12015-03-02 13:40:36 -0800296
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;targetLink&quot;: &quot;A String&quot;,
309 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
310 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
311 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
312 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
313 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
314 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
315 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
316 # populated.
317 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
318 { # Database instance operation error.
319 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
320 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
321 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700322 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700323 ],
324 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
325 },
326 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
327 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 &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 -0700329 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
330 # specify a database, and is overridden by any database specification in the
331 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
332 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
334 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
335 &quot;encryptionOptions&quot;: {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700336 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim65020912020-05-20 12:08:20 -0700337 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
338 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
339 # write permissions to the bucket and read access to the file.
340 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
341 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
342 # write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 },
344 },
345 &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 -0700346 # &lt;code&gt;gs:
347 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
348 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
349 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 &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
351 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700352 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
353 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
354 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
355 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
356 # of the database table are loaded with CSV data.
357 &quot;A String&quot;,
358 ],
359 },
Craig Citroe633be12015-03-02 13:40:36 -0800360 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
362 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
363 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
364 &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 -0700365 # identifier to retrieve the Operations resource that has information about
366 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700368 &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
369 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
370 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
371 # stored. The URI is in the form &lt;code&gt;gs:
372 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
373 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
374 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
375 # // compressed.
376 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
377 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
378 },
379 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 &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 },
408 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700410 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
411 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
412 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
413 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
414 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
415 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
416 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
417 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
418 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
419 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
420 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
421 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700441 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#databasesList&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 &quot;items&quot;: [ # List of database resources in the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 { # Represents a SQL database on the Cloud SQL instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700444 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
445 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
446 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
447 # the project ID or instance name.
448 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
449 # apps domain is prefixed if applicable.
450 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
451 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
452 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
453 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
Craig Citroe633be12015-03-02 13:40:36 -0800454 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700455 &quot;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
456 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
457 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
458 # API.
459 },
Craig Citroe633be12015-03-02 13:40:36 -0800460 ],
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 Kim4ed7d3f2020-05-27 12:20:54 -0700477 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
478 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
479 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
480 # the project ID or instance name.
481 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
482 # apps domain is prefixed if applicable.
483 &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;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
489 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
490 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
491 # API.
492}
Craig Citroe633be12015-03-02 13:40:36 -0800493
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;targetLink&quot;: &quot;A String&quot;,
506 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
507 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
508 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
509 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
510 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
511 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
512 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
513 # populated.
514 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
515 { # Database instance operation error.
516 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
517 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
518 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700519 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 ],
521 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
522 },
523 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
524 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700525 &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 -0700526 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
527 # specify a database, and is overridden by any database specification in the
528 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
529 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
531 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
532 &quot;encryptionOptions&quot;: {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700533 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
535 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
536 # write permissions to the bucket and read access to the file.
537 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
538 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
539 # write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 },
541 },
542 &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 -0700543 # &lt;code&gt;gs:
544 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
545 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
546 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700547 &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
548 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700549 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
550 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
551 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
552 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
553 # of the database table are loaded with CSV data.
554 &quot;A String&quot;,
555 ],
556 },
Craig Citroe633be12015-03-02 13:40:36 -0800557 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700558 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
559 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
560 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
561 &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 -0700562 # identifier to retrieve the Operations resource that has information about
563 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700565 &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
566 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
567 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
568 # stored. The URI is in the form &lt;code&gt;gs:
569 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
570 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
571 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
572 # // compressed.
573 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
574 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
575 },
576 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700577 &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 },
605 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700606 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700607 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
608 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
609 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
610 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
611 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
612 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
613 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
614 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
615 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
616 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
617 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
618 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700635 &quot;collation&quot;: &quot;A String&quot;, # The MySQL collation value.
636 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
637 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include
638 # the project ID or instance name.
639 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
640 # apps domain is prefixed if applicable.
641 &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;charset&quot;: &quot;A String&quot;, # The MySQL charset value.
647 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#database&lt;/code&gt;.
648 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
649 # API.
650}
Craig Citroe633be12015-03-02 13:40:36 -0800651
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;targetLink&quot;: &quot;A String&quot;,
664 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
665 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
666 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
667 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
668 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
669 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
670 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
671 # populated.
672 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
673 { # Database instance operation error.
674 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
675 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
676 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700677 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700678 ],
679 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
680 },
681 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
682 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700683 &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 -0700684 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
685 # specify a database, and is overridden by any database specification in the
686 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
687 # must be specified.
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
689 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
690 &quot;encryptionOptions&quot;: {
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700691 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
693 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
694 # write permissions to the bucket and read access to the file.
695 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
696 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
697 # write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 },
699 },
700 &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 -0700701 # &lt;code&gt;gs:
702 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
703 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
704 # // write permissions to the bucket and read access to the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700705 &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
706 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700707 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
708 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
709 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
710 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
711 # of the database table are loaded with CSV data.
712 &quot;A String&quot;,
713 ],
714 },
Craig Citroe633be12015-03-02 13:40:36 -0800715 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
717 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
718 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
719 &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 -0700720 # identifier to retrieve the Operations resource that has information about
721 # the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700723 &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
724 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
725 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
726 # stored. The URI is in the form &lt;code&gt;gs:
727 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
728 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
729 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
730 # // compressed.
731 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
732 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
733 },
734 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 &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 },
763 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700764 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700765 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
766 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
767 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
768 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
769 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
770 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
771 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
772 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
773 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
774 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
775 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
776 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800777 }</pre>
778</div>
779
780</body></html>