blob: d6e8b29fb85edc3758a5a4ea5cd723701b3ae57d [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070081 <code><a href="#delete">delete(project, instance, name=None, host=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080082<p class="firstline">Deletes a user from a Cloud SQL instance.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080085<p class="firstline">Creates a new user in a Cloud SQL instance.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Lists users in the specified Cloud SQL instance.</p>
89<p class="toc_element">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080090 <code><a href="#update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080091<p class="firstline">Updates an existing user in a Cloud SQL instance.</p>
92<h3>Method Details</h3>
93<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094 <code class="details" id="close">close()</code>
95 <pre>Close httplib2 connections.</pre>
96</div>
97
98<div class="method">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070099 <code class="details" id="delete">delete(project, instance, name=None, host=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800100 <pre>Deletes a user from a Cloud SQL instance.
101
102Args:
103 project: string, Project ID of the project that contains the instance. (required)
104 instance: string, Database instance ID. This does not include the project ID. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 name: string, Name of the user in the instance.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700106 host: string, Host of the user in the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700107 x__xgafv: string, V1 error format.
108 Allowed values
109 1 - v1 error format
110 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800111
112Returns:
113 An object of the form:
114
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700115 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700116 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700117 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
118 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
119 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
120 { # Database instance operation error.
121 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
122 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
123 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
124 },
125 ],
126 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800127 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700128 &quot;targetLink&quot;: &quot;A String&quot;,
129 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800130 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
131 &quot;offload&quot;: True or False, # Option for export offload.
132 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
133 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
134 },
135 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
136 &quot;A String&quot;,
137 ],
138 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
139 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
140 &quot;schemaOnly&quot;: True or False, # Export only schemas.
141 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
142 &quot;A String&quot;,
143 ],
144 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
145 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
146 },
147 },
148 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
149 &quot;uri&quot;: &quot;A String&quot;, # 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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
150 },
151 &quot;operationType&quot;: &quot;A String&quot;, # 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*
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700152 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800153 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
154 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
155 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
156 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
157 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
158 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
159 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
160 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
161 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
162 &quot;A String&quot;,
163 ],
164 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
165 },
166 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
167 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
168 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
169 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
170 &quot;encryptionOptions&quot;: {
171 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
172 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
173 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
174 },
175 },
176 },
177 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
178 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800179 }</pre>
180</div>
181
182<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800184 <pre>Creates a new user in a Cloud SQL instance.
185
186Args:
187 project: string, Project ID of the project that contains the instance. (required)
188 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800190 The object takes the form of:
191
192{ # A Cloud SQL user resource.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800193 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
194 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
195 &quot;serverRoles&quot;: [ # The server roles for this user
196 &quot;A String&quot;,
197 ],
198 &quot;disabled&quot;: True or False, # If the user has been disabled
199 },
200 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
201 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL.
202 &quot;project&quot;: &quot;A String&quot;, # 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.
203 &quot;instance&quot;: &quot;A String&quot;, # 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.
204 &quot;type&quot;: &quot;A String&quot;, # The user type. It determines the method to authenticate the user during login. The default is the database&#x27;s built-in user type.
205 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
206 &quot;host&quot;: &quot;A String&quot;, # 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 cannot be updated after insertion.
207 }
Craig Citroe633be12015-03-02 13:40:36 -0800208
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 x__xgafv: string, V1 error format.
210 Allowed values
211 1 - v1 error format
212 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800213
214Returns:
215 An object of the form:
216
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700217 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700218 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700219 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
220 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
221 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
222 { # Database instance operation error.
223 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
224 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
225 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
226 },
227 ],
228 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800229 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700230 &quot;targetLink&quot;: &quot;A String&quot;,
231 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800232 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
233 &quot;offload&quot;: True or False, # Option for export offload.
234 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
235 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
236 },
237 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
238 &quot;A String&quot;,
239 ],
240 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
241 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
242 &quot;schemaOnly&quot;: True or False, # Export only schemas.
243 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
244 &quot;A String&quot;,
245 ],
246 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
247 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
248 },
249 },
250 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
251 &quot;uri&quot;: &quot;A String&quot;, # 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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
252 },
253 &quot;operationType&quot;: &quot;A String&quot;, # 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*
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700254 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800255 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
256 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
257 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
258 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
259 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
260 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
261 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
262 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
263 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
264 &quot;A String&quot;,
265 ],
266 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
267 },
268 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
269 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
270 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
271 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
272 &quot;encryptionOptions&quot;: {
273 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
274 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
275 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
276 },
277 },
278 },
279 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
280 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800281 }</pre>
282</div>
283
284<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700285 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800286 <pre>Lists users in the specified Cloud SQL instance.
287
288Args:
289 project: string, Project ID of the project that contains the instance. (required)
290 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 x__xgafv: string, V1 error format.
292 Allowed values
293 1 - v1 error format
294 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800295
296Returns:
297 An object of the form:
298
299 { # User list response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 &quot;items&quot;: [ # List of user resources in the instance.
Craig Citroe633be12015-03-02 13:40:36 -0800301 { # A Cloud SQL user resource.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800302 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
303 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
304 &quot;serverRoles&quot;: [ # The server roles for this user
305 &quot;A String&quot;,
306 ],
307 &quot;disabled&quot;: True or False, # If the user has been disabled
308 },
309 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
310 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL.
311 &quot;project&quot;: &quot;A String&quot;, # 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.
312 &quot;instance&quot;: &quot;A String&quot;, # 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.
313 &quot;type&quot;: &quot;A String&quot;, # The user type. It determines the method to authenticate the user during login. The default is the database&#x27;s built-in user type.
314 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
315 &quot;host&quot;: &quot;A String&quot;, # 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 cannot be updated after insertion.
Craig Citroe633be12015-03-02 13:40:36 -0800316 },
317 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800318 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#usersList*.
319 &quot;nextPageToken&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800320 }</pre>
321</div>
322
323<div class="method">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800324 <code class="details" id="update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800325 <pre>Updates an existing user in a Cloud SQL instance.
326
327Args:
328 project: string, Project ID of the project that contains the instance. (required)
329 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700330 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800331 The object takes the form of:
332
333{ # A Cloud SQL user resource.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800334 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
335 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
336 &quot;serverRoles&quot;: [ # The server roles for this user
337 &quot;A String&quot;,
338 ],
339 &quot;disabled&quot;: True or False, # If the user has been disabled
340 },
341 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
342 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL.
343 &quot;project&quot;: &quot;A String&quot;, # 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.
344 &quot;instance&quot;: &quot;A String&quot;, # 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.
345 &quot;type&quot;: &quot;A String&quot;, # The user type. It determines the method to authenticate the user during login. The default is the database&#x27;s built-in user type.
346 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
347 &quot;host&quot;: &quot;A String&quot;, # 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 cannot be updated after insertion.
348 }
Craig Citroe633be12015-03-02 13:40:36 -0800349
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700350 host: string, Optional. Host of the user in the instance.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800351 name: string, Name of the user in the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 x__xgafv: string, V1 error format.
353 Allowed values
354 1 - v1 error format
355 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800356
357Returns:
358 An object of the form:
359
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700360 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700361 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700362 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
363 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
364 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
365 { # Database instance operation error.
366 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
367 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
368 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
369 },
370 ],
371 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800372 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700373 &quot;targetLink&quot;: &quot;A String&quot;,
374 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800375 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
376 &quot;offload&quot;: True or False, # Option for export offload.
377 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
378 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
379 },
380 &quot;databases&quot;: [ # Databases to be exported. *MySQL instances:* If *fileType* is *SQL* and no database is specified, all databases are exported, except for the *mysql* system database. If *fileType* is *CSV*, you can specify one database, either by using this property or by using the *csvExportOptions.selectQuery* property, which takes precedence over this property. *PostgreSQL instances:* You must specify one database to be exported. If *fileType* is *CSV*, this database must match the one specified in the *csvExportOptions.selectQuery* property.
381 &quot;A String&quot;,
382 ],
383 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
384 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
385 &quot;schemaOnly&quot;: True or False, # Export only schemas.
386 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
387 &quot;A String&quot;,
388 ],
389 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
390 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
391 },
392 },
393 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
394 &quot;uri&quot;: &quot;A String&quot;, # 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 requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
395 },
396 &quot;operationType&quot;: &quot;A String&quot;, # 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*
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700397 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800398 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
399 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
400 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
401 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
402 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
403 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form *gs: //bucketName/fileName*. Compressed gzip files (.gz) are supported // when *fileType* is *SQL*. The instance must have // write permissions to the bucket and read access to the file.
404 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
405 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
406 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
407 &quot;A String&quot;,
408 ],
409 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
410 },
411 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If *fileType* is *SQL*, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If *fileType* is *CSV*, one database must be specified.
412 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
413 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
414 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
415 &quot;encryptionOptions&quot;: {
416 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
417 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
418 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
419 },
420 },
421 },
422 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
423 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
Craig Citroe633be12015-03-02 13:40:36 -0800424 }</pre>
425</div>
426
427</body></html>