blob: bd2b8d39fa8721babe5c15181d77b40ee4d79b07 [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700110 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
111 # identifier to retrieve the Operations resource that has information about
112 # the operation.
113 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
114 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
115 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
116 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
117 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
118 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
119 # either by using this property or by using the
120 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
121 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
122 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
123 # this database must match the one specified in the
124 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
125 &quot;A String&quot;,
126 ],
127 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
128 &quot;schemaOnly&quot;: True or False, # Export only schemas.
129 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
130 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
131 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
132 # a CHANGE MASTER TO statement with the binary log coordinates.
133 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
134 # a SQL comment, and has no effect.
135 # All other values are ignored.
136 },
137 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
138 # you specify tables, specify one and only one database. For PostgreSQL
139 # instances, you can specify only one table.
140 &quot;A String&quot;,
141 ],
142 },
143 &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
144 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
145 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
146 # stored. The URI is in the form &lt;code&gt;gs:
147 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
148 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
149 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
150 # // compressed.
151 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
152 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
153 },
154 },
155 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
156 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
157 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
158 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
159 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
160 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
161 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
162 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
163 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
164 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
166 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
167 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
168 &quot;targetLink&quot;: &quot;A String&quot;,
169 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
170 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
171 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
172 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
173 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
174 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
175 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
176 # populated.
177 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
178 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700179 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
181 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 },
183 ],
184 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
185 },
186 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
187 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700188 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700189 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
190 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
191 # of the database table are loaded with CSV data.
192 &quot;A String&quot;,
193 ],
194 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
195 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700196 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
197 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
198 # specify a database, and is overridden by any database specification in the
199 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
200 # must be specified.
201 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
202 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
203 &quot;encryptionOptions&quot;: {
204 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
205 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
206 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
207 # write permissions to the bucket and read access to the file.
208 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
209 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
210 # write permissions to the bucket and read access to the file.
211 },
212 },
213 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
214 # &lt;code&gt;gs:
215 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
216 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
217 # // write permissions to the bucket and read access to the file.
218 &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
219 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
220 },
221 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
222 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
223 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700238 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
239 &quot;disabled&quot;: True or False, # If the user has been disabled
240 &quot;serverRoles&quot;: [ # The server roles for this user
241 &quot;A String&quot;,
242 ],
243 },
244 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for
245 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
246 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
247 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
248 # URL.
249 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
250 # apps domain is prefixed if applicable. Can be omitted for
251 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700252 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
253 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
254 # operations, host is specified as part of the request URL. The host name
255 # cannot be updated after insertion.
256 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#user&lt;/code&gt;.
257 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
258 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
259 # API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 }
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700273 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
274 # identifier to retrieve the Operations resource that has information about
275 # the operation.
276 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
277 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
278 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
279 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
280 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
281 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
282 # either by using this property or by using the
283 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
284 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
285 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
286 # this database must match the one specified in the
287 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
288 &quot;A String&quot;,
289 ],
290 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
291 &quot;schemaOnly&quot;: True or False, # Export only schemas.
292 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
293 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
294 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
295 # a CHANGE MASTER TO statement with the binary log coordinates.
296 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
297 # a SQL comment, and has no effect.
298 # All other values are ignored.
299 },
300 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
301 # you specify tables, specify one and only one database. For PostgreSQL
302 # instances, you can specify only one table.
303 &quot;A String&quot;,
304 ],
305 },
306 &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
307 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
308 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
309 # stored. The URI is in the form &lt;code&gt;gs:
310 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
311 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
312 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
313 # // compressed.
314 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
315 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
316 },
317 },
318 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
319 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
320 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
321 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
322 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
323 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
324 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
325 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
326 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
327 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
329 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
330 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
331 &quot;targetLink&quot;: &quot;A String&quot;,
332 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
333 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
334 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
335 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
336 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
337 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
338 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
339 # populated.
340 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
341 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700342 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
344 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 },
346 ],
347 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
348 },
349 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
350 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700351 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
353 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
354 # of the database table are loaded with CSV data.
355 &quot;A String&quot;,
356 ],
357 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
358 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
360 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
361 # specify a database, and is overridden by any database specification in the
362 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
363 # must be specified.
364 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
365 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
366 &quot;encryptionOptions&quot;: {
367 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
368 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
369 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
370 # write permissions to the bucket and read access to the file.
371 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
372 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
373 # write permissions to the bucket and read access to the file.
374 },
375 },
376 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
377 # &lt;code&gt;gs:
378 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
379 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
380 # // write permissions to the bucket and read access to the file.
381 &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
382 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
383 },
384 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
385 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
386 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
413 &quot;disabled&quot;: True or False, # If the user has been disabled
414 &quot;serverRoles&quot;: [ # The server roles for this user
415 &quot;A String&quot;,
416 ],
417 },
418 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for
419 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
420 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
421 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
422 # URL.
423 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
424 # apps domain is prefixed if applicable. Can be omitted for
425 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700426 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
427 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
428 # operations, host is specified as part of the request URL. The host name
429 # cannot be updated after insertion.
430 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#user&lt;/code&gt;.
431 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
432 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
433 # API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 },
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700450 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
451 &quot;disabled&quot;: True or False, # If the user has been disabled
452 &quot;serverRoles&quot;: [ # The server roles for this user
453 &quot;A String&quot;,
454 ],
455 },
456 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for
457 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
458 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
459 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
460 # URL.
461 &quot;project&quot;: &quot;A String&quot;, # The project ID of the project containing the Cloud SQL database. The Google
462 # apps domain is prefixed if applicable. Can be omitted for
463 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700464 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
465 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
466 # operations, host is specified as part of the request URL. The host name
467 # cannot be updated after insertion.
468 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#user&lt;/code&gt;.
469 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
470 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the
471 # API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 }
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700487 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this
488 # identifier to retrieve the Operations resource that has information about
489 # the operation.
490 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
491 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
492 &quot;databases&quot;: [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
493 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
494 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
495 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
496 # either by using this property or by using the
497 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
498 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
499 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
500 # this database must match the one specified in the
501 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
502 &quot;A String&quot;,
503 ],
504 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
505 &quot;schemaOnly&quot;: True or False, # Export only schemas.
506 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
507 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication.
508 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
509 # a CHANGE MASTER TO statement with the binary log coordinates.
510 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
511 # a SQL comment, and has no effect.
512 # All other values are ignored.
513 },
514 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If
515 # you specify tables, specify one and only one database. For PostgreSQL
516 # instances, you can specify only one table.
517 &quot;A String&quot;,
518 ],
519 },
520 &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
521 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
522 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be
523 # stored. The URI is in the form &lt;code&gt;gs:
524 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
525 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
526 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
527 # // compressed.
528 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
529 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
530 },
531 },
532 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
533 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in &lt;a
534 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
535 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
536 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in &lt;a
537 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
538 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
539 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in &lt;a
540 # href=&quot;https://tools.ietf.org/html/rfc3339&quot;&gt;RFC 3339&lt;/a&gt; format, for example
541 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700542 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
543 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
544 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
545 &quot;targetLink&quot;: &quot;A String&quot;,
546 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
547 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
548 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
549 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
550 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
551 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
552 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
553 # populated.
554 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
555 { # Database instance operation error.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700556 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
558 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 },
560 ],
561 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
562 },
563 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
564 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700565 &quot;kind&quot;: &quot;A String&quot;, # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
567 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns
568 # of the database table are loaded with CSV data.
569 &quot;A String&quot;,
570 ],
571 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
572 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700573 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
574 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
575 # specify a database, and is overridden by any database specification in the
576 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
577 # must be specified.
578 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
579 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
580 &quot;encryptionOptions&quot;: {
581 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
582 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form
583 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
584 # write permissions to the bucket and read access to the file.
585 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
586 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
587 # write permissions to the bucket and read access to the file.
588 },
589 },
590 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form
591 # &lt;code&gt;gs:
592 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
593 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
594 # // write permissions to the bucket and read access to the file.
595 &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
596 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
597 },
598 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
599 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
600 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700601 }</pre>
602</div>
603
604</body></html>