blob: 1a676d6124787238f1f820f3cb50d818a515062a [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
75<h1><a href="sqladmin_v1beta4.html">Cloud SQL Administration API</a> . <a href="sqladmin_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, name)</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)</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)</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, host, name, body)</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, name)</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. (required)
98 name: string, Name of the user in the instance. (required)
99
100Returns:
101 An object of the form:
102
103 { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
104 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
105 "importContext": { # Database instance import context. # The context for import operation, if applicable.
106 "fileType": "A String", # The file type for the specified uri.
107 # SQL: The file contains SQL statements.
108 # CSV: The file contains CSV data.
109 "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
110 "kind": "sql#importContext", # This is always sql#importContext.
111 "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
112 "csvImportOptions": { # Options for importing data as CSV.
113 "table": "A String", # The table to which CSV data is imported.
114 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
115 "A String",
116 ],
117 },
118 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000119 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800120 "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
121 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
122 "kind": "sql#exportContext", # This is always sql#exportContext.
123 "fileType": "A String", # The file type for the specified uri.
124 # SQL: The file contains SQL statements.
125 # CSV: The file contains CSV data.
126 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
127 "csvExportOptions": { # Options for exporting data as CSV.
128 "selectQuery": "A String", # The select query used to extract the data.
129 },
130 "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
131 "A String",
132 ],
133 "sqlExportOptions": { # Options for exporting data as SQL statements.
134 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
135 "A String",
136 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800137 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800138 },
139 },
140 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
141 "targetProject": "A String", # The project ID of the target instance related to this operation.
142 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000143 "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
Craig Citroe633be12015-03-02 13:40:36 -0800144 "targetLink": "A String", # The URI of the instance related to the operation.
145 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000146 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
147 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800148 "errors": [ # The list of errors encountered while processing this operation.
149 { # Database instance operation error.
150 "kind": "sql#operationError", # This is always sql#operationError.
151 "code": "A String", # Identifies the specific error that occurred.
152 "message": "A String", # Additional information about the error encountered.
153 },
154 ],
155 },
156 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
157 "selfLink": "A String", # The URI of this resource.
158 "user": "A String", # The email address of the user who initiated this operation.
159 }</pre>
160</div>
161
162<div class="method">
163 <code class="details" id="insert">insert(project, instance, body)</code>
164 <pre>Creates a new user in a Cloud SQL instance.
165
166Args:
167 project: string, Project ID of the project that contains the instance. (required)
168 instance: string, Database instance ID. This does not include the project ID. (required)
169 body: object, The request body. (required)
170 The object takes the form of:
171
172{ # A Cloud SQL user resource.
173 "kind": "sql#user", # This is always sql#user.
174 "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for update since it is already specified on the URL.
175 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update since it is already specified on the URL.
176 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for update since it is already specified on the URL.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000177 "host": "A String", # The host name from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name is not mutable with this API.
Craig Citroe633be12015-03-02 13:40:36 -0800178 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
179 "password": "A String", # The password for the user.
180 }
181
182
183Returns:
184 An object of the form:
185
186 { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
187 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
188 "importContext": { # Database instance import context. # The context for import operation, if applicable.
189 "fileType": "A String", # The file type for the specified uri.
190 # SQL: The file contains SQL statements.
191 # CSV: The file contains CSV data.
192 "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
193 "kind": "sql#importContext", # This is always sql#importContext.
194 "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
195 "csvImportOptions": { # Options for importing data as CSV.
196 "table": "A String", # The table to which CSV data is imported.
197 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
198 "A String",
199 ],
200 },
201 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000202 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800203 "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
204 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
205 "kind": "sql#exportContext", # This is always sql#exportContext.
206 "fileType": "A String", # The file type for the specified uri.
207 # SQL: The file contains SQL statements.
208 # CSV: The file contains CSV data.
209 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
210 "csvExportOptions": { # Options for exporting data as CSV.
211 "selectQuery": "A String", # The select query used to extract the data.
212 },
213 "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
214 "A String",
215 ],
216 "sqlExportOptions": { # Options for exporting data as SQL statements.
217 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
218 "A String",
219 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800220 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800221 },
222 },
223 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
224 "targetProject": "A String", # The project ID of the target instance related to this operation.
225 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000226 "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
Craig Citroe633be12015-03-02 13:40:36 -0800227 "targetLink": "A String", # The URI of the instance related to the operation.
228 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000229 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
230 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800231 "errors": [ # The list of errors encountered while processing this operation.
232 { # Database instance operation error.
233 "kind": "sql#operationError", # This is always sql#operationError.
234 "code": "A String", # Identifies the specific error that occurred.
235 "message": "A String", # Additional information about the error encountered.
236 },
237 ],
238 },
239 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
240 "selfLink": "A String", # The URI of this resource.
241 "user": "A String", # The email address of the user who initiated this operation.
242 }</pre>
243</div>
244
245<div class="method">
246 <code class="details" id="list">list(project, instance)</code>
247 <pre>Lists users in the specified Cloud SQL instance.
248
249Args:
250 project: string, Project ID of the project that contains the instance. (required)
251 instance: string, Database instance ID. This does not include the project ID. (required)
252
253Returns:
254 An object of the form:
255
256 { # User list response.
257 "nextPageToken": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
258 "items": [ # List of user resources in the instance.
259 { # A Cloud SQL user resource.
260 "kind": "sql#user", # This is always sql#user.
261 "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for update since it is already specified on the URL.
262 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update since it is already specified on the URL.
263 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for update since it is already specified on the URL.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000264 "host": "A String", # The host name from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name is not mutable with this API.
Craig Citroe633be12015-03-02 13:40:36 -0800265 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
266 "password": "A String", # The password for the user.
267 },
268 ],
269 "kind": "sql#usersList", # This is always sql#usersList.
270 }</pre>
271</div>
272
273<div class="method">
274 <code class="details" id="update">update(project, instance, host, name, body)</code>
275 <pre>Updates an existing user in a Cloud SQL instance.
276
277Args:
278 project: string, Project ID of the project that contains the instance. (required)
279 instance: string, Database instance ID. This does not include the project ID. (required)
280 host: string, Host of the user in the instance. (required)
281 name: string, Name of the user in the instance. (required)
282 body: object, The request body. (required)
283 The object takes the form of:
284
285{ # A Cloud SQL user resource.
286 "kind": "sql#user", # This is always sql#user.
287 "name": "A String", # The name of the user in the Cloud SQL instance. Can be omitted for update since it is already specified on the URL.
288 "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update since it is already specified on the URL.
289 "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for update since it is already specified on the URL.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000290 "host": "A String", # The host name from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name is not mutable with this API.
Craig Citroe633be12015-03-02 13:40:36 -0800291 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
292 "password": "A String", # The password for the user.
293 }
294
295
296Returns:
297 An object of the form:
298
299 { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
300 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
301 "importContext": { # Database instance import context. # The context for import operation, if applicable.
302 "fileType": "A String", # The file type for the specified uri.
303 # SQL: The file contains SQL statements.
304 # CSV: The file contains CSV data.
305 "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
306 "kind": "sql#importContext", # This is always sql#importContext.
307 "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
308 "csvImportOptions": { # Options for importing data as CSV.
309 "table": "A String", # The table to which CSV data is imported.
310 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
311 "A String",
312 ],
313 },
314 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000315 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800316 "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
317 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
318 "kind": "sql#exportContext", # This is always sql#exportContext.
319 "fileType": "A String", # The file type for the specified uri.
320 # SQL: The file contains SQL statements.
321 # CSV: The file contains CSV data.
322 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
323 "csvExportOptions": { # Options for exporting data as CSV.
324 "selectQuery": "A String", # The select query used to extract the data.
325 },
326 "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
327 "A String",
328 ],
329 "sqlExportOptions": { # Options for exporting data as SQL statements.
330 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
331 "A String",
332 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800333 "schemaOnly": True or False, # Export only schemas.
Craig Citroe633be12015-03-02 13:40:36 -0800334 },
335 },
336 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
337 "targetProject": "A String", # The project ID of the target instance related to this operation.
338 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000339 "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
Craig Citroe633be12015-03-02 13:40:36 -0800340 "targetLink": "A String", # The URI of the instance related to the operation.
341 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000342 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
343 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800344 "errors": [ # The list of errors encountered while processing this operation.
345 { # Database instance operation error.
346 "kind": "sql#operationError", # This is always sql#operationError.
347 "code": "A String", # Identifies the specific error that occurred.
348 "message": "A String", # Additional information about the error encountered.
349 },
350 ],
351 },
352 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
353 "selfLink": "A String", # The URI of this resource.
354 "user": "A String", # The email address of the user who initiated this operation.
355 }</pre>
356</div>
357
358</body></html>