blob: a5ce15a554dbd07f431a806b55fdac97e1945840 [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">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070090 <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 -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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700116 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700117 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
119 &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.
120 &quot;A String&quot;,
121 ],
122 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
123 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700124 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
125 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
126 &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.
127 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700128 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
129 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700130 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700131 &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.
132 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700133 },
134 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700135 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700136 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
137 &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.
138 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
139 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
140 &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.
141 },
142 &quot;schemaOnly&quot;: True or False, # Export only schemas.
143 &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.
144 &quot;A String&quot;,
145 ],
146 },
147 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
148 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
149 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
150 },
151 &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.
152 &quot;offload&quot;: True or False, # Option for export offload.
153 &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.
154 &quot;A String&quot;,
155 ],
156 },
157 &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*.
158 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
159 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
160 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
161 &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*.
162 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
163 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
164 &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*
165 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
166 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
167 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
168 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
169 { # Database instance operation error.
170 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
171 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
172 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
173 },
174 ],
175 },
176 &quot;targetLink&quot;: &quot;A String&quot;,
177 &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.
178 &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*.
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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700193 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
194 &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.
195 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
196 &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.
197 &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.
198 &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.
199 &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.
200 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700201 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700202 &quot;disabled&quot;: True or False, # If the user has been disabled
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700203 &quot;serverRoles&quot;: [ # The server roles for this user
204 &quot;A String&quot;,
205 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700206 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700207}
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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700218 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700219 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700220 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
221 &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.
222 &quot;A String&quot;,
223 ],
224 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
225 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700226 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
227 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
228 &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.
229 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700230 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
231 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700232 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700233 &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.
234 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700235 },
236 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700237 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700238 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
239 &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.
240 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
241 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
242 &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.
243 },
244 &quot;schemaOnly&quot;: True or False, # Export only schemas.
245 &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.
246 &quot;A String&quot;,
247 ],
248 },
249 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
250 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
251 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
252 },
253 &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.
254 &quot;offload&quot;: True or False, # Option for export offload.
255 &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.
256 &quot;A String&quot;,
257 ],
258 },
259 &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*.
260 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
261 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
262 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
263 &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*.
264 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
265 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
266 &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*
267 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
268 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
269 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
270 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
271 { # Database instance operation error.
272 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
273 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
274 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
275 },
276 ],
277 },
278 &quot;targetLink&quot;: &quot;A String&quot;,
279 &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.
280 &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*.
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 Kim673ec5c2020-11-16 11:05:03 -0700300 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#usersList*.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700301 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 &quot;items&quot;: [ # List of user resources in the instance.
Craig Citroe633be12015-03-02 13:40:36 -0800303 { # A Cloud SQL user resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700304 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
305 &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.
306 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
307 &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.
308 &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.
309 &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.
310 &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.
311 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700312 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700313 &quot;disabled&quot;: True or False, # If the user has been disabled
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700314 &quot;serverRoles&quot;: [ # The server roles for this user
315 &quot;A String&quot;,
316 ],
Craig Citroe633be12015-03-02 13:40:36 -0800317 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700318 },
Craig Citroe633be12015-03-02 13:40:36 -0800319 ],
Craig Citroe633be12015-03-02 13:40:36 -0800320 }</pre>
321</div>
322
323<div class="method">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700324 <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 -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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700334 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
335 &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.
336 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
337 &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.
338 &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.
339 &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.
340 &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.
341 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700342 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700343 &quot;disabled&quot;: True or False, # If the user has been disabled
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700344 &quot;serverRoles&quot;: [ # The server roles for this user
345 &quot;A String&quot;,
346 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700347 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700348}
Craig Citroe633be12015-03-02 13:40:36 -0800349
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700350 name: string, Name of the user in the instance.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700351 host: string, Optional. Host 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700361 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700362 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700363 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
364 &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.
365 &quot;A String&quot;,
366 ],
367 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
368 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700369 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
370 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
371 &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.
372 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700373 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
374 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700375 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700376 &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.
377 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700378 },
379 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700380 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700381 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
382 &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.
383 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
384 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
385 &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.
386 },
387 &quot;schemaOnly&quot;: True or False, # Export only schemas.
388 &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.
389 &quot;A String&quot;,
390 ],
391 },
392 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
393 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
394 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
395 },
396 &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.
397 &quot;offload&quot;: True or False, # Option for export offload.
398 &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.
399 &quot;A String&quot;,
400 ],
401 },
402 &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*.
403 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
404 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
405 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
406 &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*.
407 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
408 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
409 &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*
410 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
411 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
412 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
413 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
414 { # Database instance operation error.
415 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
416 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
417 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
418 },
419 ],
420 },
421 &quot;targetLink&quot;: &quot;A String&quot;,
422 &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.
423 &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*.
Craig Citroe633be12015-03-02 13:40:36 -0800424 }</pre>
425</div>
426
427</body></html>