blob: 0d596aa89269a23a6ec2e5a781d85519a6e1d1a3 [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.users.html">users</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, name=None, host=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080079<p class="firstline">Deletes a user from a Cloud SQL instance.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080082<p class="firstline">Creates a new user in a Cloud SQL instance.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080085<p class="firstline">Lists users in the specified Cloud SQL instance.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#update">update(project, instance, body=None, name=None, host=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Updates an existing user in a Cloud SQL instance.</p>
89<h3>Method Details</h3>
90<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070091 <code class="details" id="delete">delete(project, instance, name=None, host=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -080092 <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)
Dan O'Mearadd494642020-05-01 07:42:23 -070097 name: string, Name of the user in the instance.
98 host: string, Host 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
Craig Citroe633be12015-03-02 13:40:36 -0800103
104Returns:
105 An object of the form:
106
Dan O'Mearadd494642020-05-01 07:42:23 -0700107 { # 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 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
111 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
112 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800113 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
115 "encryptionOptions": {
116 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
117 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
118 # write permissions to the bucket and read access to the file.
119 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
120 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
121 # write permissions to the bucket and read access to the file.
122 "pvkPassword": "A String", # Password that encrypts the private key
123 },
124 },
125 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
126 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
127 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
128 # specify a database, and is overridden by any database specification in the
129 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
130 # must be specified.
131 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
132 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
133 "uri": "A String", # Path to the import file in Cloud Storage, in the form
134 # &lt;code&gt;gs:
135 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
136 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
137 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800139 "csvImportOptions": { # Options for importing data as CSV.
140 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
142 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800143 "A String",
144 ],
145 },
146 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
148 "targetProject": "A String", # The project ID of the target instance related to this operation.
149 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
150 # identifier to retrieve the Operations resource that has information about
151 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800152 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
154 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
155 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
156 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
157 # stored. The URI is in the form &lt;code&gt;gs:
158 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
159 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
160 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
161 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800162 "csvExportOptions": { # Options for exporting data as CSV.
163 "selectQuery": "A String", # The select query used to extract the data.
164 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
166 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
167 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
168 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
169 # either by using this property or by using the
170 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
171 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
172 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
173 # this database must match the one specified in the
174 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800175 "A String",
176 ],
177 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700178 "tables": [ # Tables to export, or that were exported, from the specified database. If
179 # you specify tables, specify one and only one database. For PostgreSQL
180 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800181 "A String",
182 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700184 "masterData": 42, # Option to include SQL statement required to set up replication.
185 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
186 # a CHANGE MASTER TO statement with the binary log coordinates.
187 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
188 # a SQL comment, and has no effect.
189 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700190 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800191 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800192 },
193 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700194 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
195 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
196 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800197 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700198 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
199 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
200 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
201 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
202 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
203 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
204 "user": "A String", # The email address of the user who initiated this operation.
205 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
206 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
207 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
208 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
209 # populated.
210 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800211 "errors": [ # The list of errors encountered while processing this operation.
212 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800214 "code": "A String", # Identifies the specific error that occurred.
215 "message": "A String", # Additional information about the error encountered.
216 },
217 ],
218 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
220 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
221 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800222 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800224 }</pre>
225</div>
226
227<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800229 <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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800235 The object takes the form of:
236
237{ # A Cloud SQL user resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700238 "kind": "A String", # This is always &lt;code&gt;sql#user&lt;/code&gt;.
239 "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for
240 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
241 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google
242 # apps domain is prefixed if applicable. Can be omitted for
243 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
244 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
245 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
246 # URL.
247 "host": "A String", # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
248 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
249 # operations, host is specified as part of the request URL. The host name
250 # cannot be updated after insertion.
251 "etag": "A String", # This field is deprecated and will be removed from a future version of the
252 # API.
253 "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance.
254 "disabled": True or False, # If the user has been disabled
255 "serverRoles": [ # The server roles for this user
256 "A String",
257 ],
258 },
Craig Citroe633be12015-03-02 13:40:36 -0800259 "password": "A String", # The password for the user.
260 }
261
Dan O'Mearadd494642020-05-01 07:42:23 -0700262 x__xgafv: string, V1 error format.
263 Allowed values
264 1 - v1 error format
265 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800266
267Returns:
268 An object of the form:
269
Dan O'Mearadd494642020-05-01 07:42:23 -0700270 { # 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 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
274 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
275 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800276 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
278 "encryptionOptions": {
279 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
280 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
281 # write permissions to the bucket and read access to the file.
282 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
283 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
284 # write permissions to the bucket and read access to the file.
285 "pvkPassword": "A String", # Password that encrypts the private key
286 },
287 },
288 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
289 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
290 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
291 # specify a database, and is overridden by any database specification in the
292 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
293 # must be specified.
294 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
295 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
296 "uri": "A String", # Path to the import file in Cloud Storage, in the form
297 # &lt;code&gt;gs:
298 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
299 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
300 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800302 "csvImportOptions": { # Options for importing data as CSV.
303 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700304 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
305 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800306 "A String",
307 ],
308 },
309 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
311 "targetProject": "A String", # The project ID of the target instance related to this operation.
312 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
313 # identifier to retrieve the Operations resource that has information about
314 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800315 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700316 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
317 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
318 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
319 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
320 # stored. The URI is in the form &lt;code&gt;gs:
321 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
322 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
323 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
324 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800325 "csvExportOptions": { # Options for exporting data as CSV.
326 "selectQuery": "A String", # The select query used to extract the data.
327 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700328 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
329 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
330 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
331 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
332 # either by using this property or by using the
333 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
334 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
335 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
336 # this database must match the one specified in the
337 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800338 "A String",
339 ],
340 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700341 "tables": [ # Tables to export, or that were exported, from the specified database. If
342 # you specify tables, specify one and only one database. For PostgreSQL
343 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800344 "A String",
345 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700347 "masterData": 42, # Option to include SQL statement required to set up replication.
348 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
349 # a CHANGE MASTER TO statement with the binary log coordinates.
350 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
351 # a SQL comment, and has no effect.
352 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700353 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800354 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800355 },
356 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
358 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
359 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800360 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
362 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
363 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
364 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
365 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
366 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
367 "user": "A String", # The email address of the user who initiated this operation.
368 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
369 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
370 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
371 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
372 # populated.
373 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800374 "errors": [ # The list of errors encountered while processing this operation.
375 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800377 "code": "A String", # Identifies the specific error that occurred.
378 "message": "A String", # Additional information about the error encountered.
379 },
380 ],
381 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
383 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
384 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800385 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700386 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800387 }</pre>
388</div>
389
390<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800392 <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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 x__xgafv: string, V1 error format.
398 Allowed values
399 1 - v1 error format
400 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800401
402Returns:
403 An object of the form:
404
405 { # User list response.
Dan O'Mearadd494642020-05-01 07:42:23 -0700406 "nextPageToken": "A String", # 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.
Craig Citroe633be12015-03-02 13:40:36 -0800409 "items": [ # List of user resources in the instance.
410 { # A Cloud SQL user resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700411 "kind": "A String", # This is always &lt;code&gt;sql#user&lt;/code&gt;.
412 "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for
413 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
414 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google
415 # apps domain is prefixed if applicable. Can be omitted for
416 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
417 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
418 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
419 # URL.
420 "host": "A String", # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
421 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
422 # operations, host is specified as part of the request URL. The host name
423 # cannot be updated after insertion.
424 "etag": "A String", # This field is deprecated and will be removed from a future version of the
425 # API.
426 "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance.
427 "disabled": True or False, # If the user has been disabled
428 "serverRoles": [ # The server roles for this user
429 "A String",
430 ],
431 },
Craig Citroe633be12015-03-02 13:40:36 -0800432 "password": "A String", # The password for the user.
433 },
434 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700435 "kind": "A String", # This is always &lt;code&gt;sql#usersList&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800436 }</pre>
437</div>
438
439<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700440 <code class="details" id="update">update(project, instance, body=None, name=None, host=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800441 <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)
Dan O'Mearadd494642020-05-01 07:42:23 -0700446 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800447 The object takes the form of:
448
449{ # A Cloud SQL user resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700450 "kind": "A String", # This is always &lt;code&gt;sql#user&lt;/code&gt;.
451 "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for
452 # &lt;code&gt;update&lt;/code&gt; since it is already specified in the URL.
453 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google
454 # apps domain is prefixed if applicable. Can be omitted for
455 # &lt;code&gt;update&lt;/code&gt; since it is already specified on the URL.
456 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID.
457 # Can be omitted for &lt;code&gt;update&lt;/code&gt; since it is already specified on the
458 # URL.
459 "host": "A String", # The host name from which the user can connect. For &lt;code&gt;insert&lt;/code&gt;
460 # operations, host defaults to an empty string. For &lt;code&gt;update&lt;/code&gt;
461 # operations, host is specified as part of the request URL. The host name
462 # cannot be updated after insertion.
463 "etag": "A String", # This field is deprecated and will be removed from a future version of the
464 # API.
465 "sqlserverUserDetails": { # Represents a Sql Server user on the Cloud SQL instance.
466 "disabled": True or False, # If the user has been disabled
467 "serverRoles": [ # The server roles for this user
468 "A String",
469 ],
470 },
Craig Citroe633be12015-03-02 13:40:36 -0800471 "password": "A String", # The password for the user.
472 }
473
Dan O'Mearadd494642020-05-01 07:42:23 -0700474 name: string, Name of the user in the instance.
475 host: string, Optional. Host 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
Craig Citroe633be12015-03-02 13:40:36 -0800480
481Returns:
482 An object of the form:
483
Dan O'Mearadd494642020-05-01 07:42:23 -0700484 { # 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 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
488 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
489 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800490 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700491 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
492 "encryptionOptions": {
493 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
494 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
495 # write permissions to the bucket and read access to the file.
496 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
497 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
498 # write permissions to the bucket and read access to the file.
499 "pvkPassword": "A String", # Password that encrypts the private key
500 },
501 },
502 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
503 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
504 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
505 # specify a database, and is overridden by any database specification in the
506 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
507 # must be specified.
508 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
509 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
510 "uri": "A String", # Path to the import file in Cloud Storage, in the form
511 # &lt;code&gt;gs:
512 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
513 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
514 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700515 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Craig Citroe633be12015-03-02 13:40:36 -0800516 "csvImportOptions": { # Options for importing data as CSV.
517 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700518 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
519 # of the database table are loaded with CSV data.
Craig Citroe633be12015-03-02 13:40:36 -0800520 "A String",
521 ],
522 },
523 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700524 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
525 "targetProject": "A String", # The project ID of the target instance related to this operation.
526 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
527 # identifier to retrieve the Operations resource that has information about
528 # the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800529 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700530 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
531 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
532 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
533 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
534 # stored. The URI is in the form &lt;code&gt;gs:
535 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
536 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
537 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
538 # // compressed.
Craig Citroe633be12015-03-02 13:40:36 -0800539 "csvExportOptions": { # Options for exporting data as CSV.
540 "selectQuery": "A String", # The select query used to extract the data.
541 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
543 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
544 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
545 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
546 # either by using this property or by using the
547 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
548 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
549 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
550 # this database must match the one specified in the
551 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Craig Citroe633be12015-03-02 13:40:36 -0800552 "A String",
553 ],
554 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 "tables": [ # Tables to export, or that were exported, from the specified database. If
556 # you specify tables, specify one and only one database. For PostgreSQL
557 # instances, you can specify only one table.
Craig Citroe633be12015-03-02 13:40:36 -0800558 "A String",
559 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700560 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700561 "masterData": 42, # Option to include SQL statement required to set up replication.
562 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
563 # a CHANGE MASTER TO statement with the binary log coordinates.
564 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
565 # a SQL comment, and has no effect.
566 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800568 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800569 },
570 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700571 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
572 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
573 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800574 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
576 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
577 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
578 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
579 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
580 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
581 "user": "A String", # The email address of the user who initiated this operation.
582 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
583 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
584 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
585 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
586 # populated.
587 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800588 "errors": [ # The list of errors encountered while processing this operation.
589 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800591 "code": "A String", # Identifies the specific error that occurred.
592 "message": "A String", # Additional information about the error encountered.
593 },
594 ],
595 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700596 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
597 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
598 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800599 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700600 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800601 }</pre>
602</div>
603
604</body></html>