blob: 183c0e782f574ce2f3cceb400597609726933398 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<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
75<h1><a href="sql_v1beta4.html">Cloud SQL Admin API</a> . <a href="sql_v1beta4.users.html">users</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, instance, host=None, name=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Deletes a user from a Cloud SQL instance.</p>
80<p class="toc_element">
81 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a new user in a Cloud SQL instance.</p>
83<p class="toc_element">
84 <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
85<p class="firstline">Lists users in the specified Cloud SQL instance.</p>
86<p class="toc_element">
87 <code><a href="#update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Updates an existing user in a Cloud SQL instance.</p>
89<h3>Method Details</h3>
90<div class="method">
91 <code class="details" id="delete">delete(project, instance, host=None, name=None, x__xgafv=None)</code>
92 <pre>Deletes a user from a Cloud SQL instance.
93
94Args:
95 project: string, Project ID of the project that contains the instance. (required)
96 instance: string, Database instance ID. This does not include the project ID. (required)
97 host: string, Host of the user in the instance.
98 name: string, Name of the user in the instance.
99 x__xgafv: string, V1 error format.
100 Allowed values
101 1 - v1 error format
102 2 - v2 error format
103
104Returns:
105 An object of the form:
106
107 { # An Operation resource.&amp;nbsp;For successful operations that return an
108 # Operation resource, only the fields relevant to the operation are populated
109 # in the resource.
110 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
111 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
112 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
113 &quot;targetLink&quot;: &quot;A String&quot;,
114 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
115 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
116 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
117 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
118 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
119 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
120 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
121 # populated.
122 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
123 { # Database instance operation error.
124 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
125 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
126 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
127 },
128 ],
129 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
130 },
131 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
132 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
133 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
134 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
135 # of the database table are loaded with CSV data.
136 &quot;A String&quot;,
137 ],
138 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
139 },
140 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
141 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
142 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
143 # specify a database, and is overridden by any database specification in the
144 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
145 # must be specified.
146 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
147 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
148 &quot;encryptionOptions&quot;: {
149 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
150 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
151 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
152 # write permissions to the bucket and read access to the file.
153 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
154 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
155 # write permissions to the bucket and read access to the file.
156 },
157 },
158 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
159 # &lt;code&gt;gs:
160 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
161 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
162 # // write permissions to the bucket and read access to the file.
163 &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
164 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
165 },
166 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
167 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
168 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
169 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
170 # identifier to retrieve the Operations resource that has information about
171 # the operation.
172 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
173 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
174 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
175 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
176 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
177 # either by using this property or by using the
178 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
179 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
180 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
181 # this database must match the one specified in the
182 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
183 &quot;A String&quot;,
184 ],
185 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
186 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
187 # you specify tables, specify one and only one database. For PostgreSQL
188 # instances, you can specify only one table.
189 &quot;A String&quot;,
190 ],
191 &quot;schemaOnly&quot;: True or False, # Export only schemas.
192 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
193 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
194 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
195 # a CHANGE MASTER TO statement with the binary log coordinates.
196 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
197 # a SQL comment, and has no effect.
198 # All other values are ignored.
199 },
200 },
201 &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
202 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
203 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
204 # stored. The URI is in the form &lt;code&gt;gs:
205 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
206 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
207 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
208 # // compressed.
209 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
210 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
211 },
212 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
213 },
214 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
215 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
216 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
217 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
218 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
219 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
220 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
221 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
222 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
223 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
224 }</pre>
225</div>
226
227<div class="method">
228 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
229 <pre>Creates a new user in a Cloud SQL instance.
230
231Args:
232 project: string, Project ID of the project that contains the instance. (required)
233 instance: string, Database instance ID. This does not include the project ID. (required)
234 body: object, The request body.
235 The object takes the form of:
236
237{ # A Cloud SQL user resource.
238 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
239 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
240 # operations, host is specified as part of the request URL. The host name
241 # cannot be updated after insertion.
242 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#user&lt;/code&gt;.
243 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
244 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
245 # API.
246 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
247 &quot;disabled&quot;: True or False, # If the user has been disabled
248 &quot;serverRoles&quot;: [ # The server roles for this user
249 &quot;A String&quot;,
250 ],
251 },
252 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for
253 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
254 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
255 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
256 # URL.
257 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
258 # apps domain is prefixed if applicable. Can be omitted for
259 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
260 }
261
262 x__xgafv: string, V1 error format.
263 Allowed values
264 1 - v1 error format
265 2 - v2 error format
266
267Returns:
268 An object of the form:
269
270 { # An Operation resource.&amp;nbsp;For successful operations that return an
271 # Operation resource, only the fields relevant to the operation are populated
272 # in the resource.
273 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
274 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
275 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
276 &quot;targetLink&quot;: &quot;A String&quot;,
277 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
278 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
279 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
280 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
281 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
282 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
283 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
284 # populated.
285 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
286 { # Database instance operation error.
287 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
288 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
289 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
290 },
291 ],
292 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
293 },
294 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
295 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
296 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
297 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
298 # of the database table are loaded with CSV data.
299 &quot;A String&quot;,
300 ],
301 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
302 },
303 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
304 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
305 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
306 # specify a database, and is overridden by any database specification in the
307 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
308 # must be specified.
309 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
310 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
311 &quot;encryptionOptions&quot;: {
312 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
313 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
314 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
315 # write permissions to the bucket and read access to the file.
316 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
317 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
318 # write permissions to the bucket and read access to the file.
319 },
320 },
321 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
322 # &lt;code&gt;gs:
323 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
324 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
325 # // write permissions to the bucket and read access to the file.
326 &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
327 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
328 },
329 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
330 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
331 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
332 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
333 # identifier to retrieve the Operations resource that has information about
334 # the operation.
335 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
336 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
337 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
338 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
339 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
340 # either by using this property or by using the
341 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
342 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
343 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
344 # this database must match the one specified in the
345 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
346 &quot;A String&quot;,
347 ],
348 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
349 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
350 # you specify tables, specify one and only one database. For PostgreSQL
351 # instances, you can specify only one table.
352 &quot;A String&quot;,
353 ],
354 &quot;schemaOnly&quot;: True or False, # Export only schemas.
355 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
356 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
357 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
358 # a CHANGE MASTER TO statement with the binary log coordinates.
359 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
360 # a SQL comment, and has no effect.
361 # All other values are ignored.
362 },
363 },
364 &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
365 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
366 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
367 # stored. The URI is in the form &lt;code&gt;gs:
368 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
369 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
370 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
371 # // compressed.
372 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
373 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
374 },
375 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
376 },
377 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
378 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
379 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
380 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
381 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
382 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
383 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
384 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
385 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
386 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
387 }</pre>
388</div>
389
390<div class="method">
391 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
392 <pre>Lists users in the specified Cloud SQL instance.
393
394Args:
395 project: string, Project ID of the project that contains the instance. (required)
396 instance: string, Database instance ID. This does not include the project ID. (required)
397 x__xgafv: string, V1 error format.
398 Allowed values
399 1 - v1 error format
400 2 - v2 error format
401
402Returns:
403 An object of the form:
404
405 { # User list response.
406 &quot;nextPageToken&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
407 # identifier to retrieve the Operations resource that has information about
408 # the operation.
409 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#usersList&lt;/code&gt;.
410 &quot;items&quot;: [ # List of user resources in the instance.
411 { # A Cloud SQL user resource.
412 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
413 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
414 # operations, host is specified as part of the request URL. The host name
415 # cannot be updated after insertion.
416 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#user&lt;/code&gt;.
417 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
418 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
419 # API.
420 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
421 &quot;disabled&quot;: True or False, # If the user has been disabled
422 &quot;serverRoles&quot;: [ # The server roles for this user
423 &quot;A String&quot;,
424 ],
425 },
426 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for
427 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
428 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
429 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
430 # URL.
431 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
432 # apps domain is prefixed if applicable. Can be omitted for
433 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
434 },
435 ],
436 }</pre>
437</div>
438
439<div class="method">
440 <code class="details" id="update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</code>
441 <pre>Updates an existing user in a Cloud SQL instance.
442
443Args:
444 project: string, Project ID of the project that contains the instance. (required)
445 instance: string, Database instance ID. This does not include the project ID. (required)
446 body: object, The request body.
447 The object takes the form of:
448
449{ # A Cloud SQL user resource.
450 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
451 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
452 # operations, host is specified as part of the request URL. The host name
453 # cannot be updated after insertion.
454 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#user&lt;/code&gt;.
455 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
456 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
457 # API.
458 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
459 &quot;disabled&quot;: True or False, # If the user has been disabled
460 &quot;serverRoles&quot;: [ # The server roles for this user
461 &quot;A String&quot;,
462 ],
463 },
464 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for
465 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
466 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
467 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
468 # URL.
469 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
470 # apps domain is prefixed if applicable. Can be omitted for
471 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
472 }
473
474 host: string, Optional. Host of the user in the instance.
475 name: string, Name of the user in the instance.
476 x__xgafv: string, V1 error format.
477 Allowed values
478 1 - v1 error format
479 2 - v2 error format
480
481Returns:
482 An object of the form:
483
484 { # An Operation resource.&amp;nbsp;For successful operations that return an
485 # Operation resource, only the fields relevant to the operation are populated
486 # in the resource.
487 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
488 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
489 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
490 &quot;targetLink&quot;: &quot;A String&quot;,
491 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
492 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
493 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
494 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
495 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
496 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
497 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
498 # populated.
499 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
500 { # Database instance operation error.
501 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
502 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
503 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
504 },
505 ],
506 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
507 },
508 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
509 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
510 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
511 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
512 # of the database table are loaded with CSV data.
513 &quot;A String&quot;,
514 ],
515 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
516 },
517 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
518 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
519 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
520 # specify a database, and is overridden by any database specification in the
521 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
522 # must be specified.
523 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
524 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
525 &quot;encryptionOptions&quot;: {
526 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
527 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
528 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
529 # write permissions to the bucket and read access to the file.
530 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
531 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
532 # write permissions to the bucket and read access to the file.
533 },
534 },
535 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
536 # &lt;code&gt;gs:
537 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
538 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
539 # // write permissions to the bucket and read access to the file.
540 &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
541 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
542 },
543 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
544 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
545 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
546 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
547 # identifier to retrieve the Operations resource that has information about
548 # the operation.
549 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
550 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
551 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
552 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
553 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
554 # either by using this property or by using the
555 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
556 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
557 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
558 # this database must match the one specified in the
559 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
560 &quot;A String&quot;,
561 ],
562 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
563 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
564 # you specify tables, specify one and only one database. For PostgreSQL
565 # instances, you can specify only one table.
566 &quot;A String&quot;,
567 ],
568 &quot;schemaOnly&quot;: True or False, # Export only schemas.
569 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
570 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
571 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
572 # a CHANGE MASTER TO statement with the binary log coordinates.
573 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
574 # a SQL comment, and has no effect.
575 # All other values are ignored.
576 },
577 },
578 &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
579 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
580 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
581 # stored. The URI is in the form &lt;code&gt;gs:
582 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
583 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
584 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
585 # // compressed.
586 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
587 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
588 },
589 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
590 },
591 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
592 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
593 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
594 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
595 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
596 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
597 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
598 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
599 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
600 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
601 }</pre>
602</div>
603
604</body></html>