1<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_v1.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1.users.html">users</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(project, instance, host=None, name=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a user from a Cloud SQL instance.</p>
83<p class="toc_element">
84  <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Creates a new user in a Cloud SQL instance.</p>
86<p class="toc_element">
87  <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
88<p class="firstline">Lists users in the specified Cloud SQL instance.</p>
89<p class="toc_element">
90  <code><a href="#update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Updates an existing user in a Cloud SQL instance.</p>
92<h3>Method Details</h3>
93<div class="method">
94    <code class="details" id="close">close()</code>
95  <pre>Close httplib2 connections.</pre>
96</div>
97
98<div class="method">
99    <code class="details" id="delete">delete(project, instance, host=None, name=None, x__xgafv=None)</code>
100  <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)
105  host: string, Host of the user in the instance.
106  name: string, Name of the user in the instance.
107  x__xgafv: string, V1 error format.
108    Allowed values
109      1 - v1 error format
110      2 - v2 error format
111
112Returns:
113  An object of the form:
114
115    { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
116  &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
117    &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
118    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
119  },
120  &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
121  &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
122    &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
123      { # Database instance operation error.
124        &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
125        &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
126        &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
127      },
128    ],
129    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
130  },
131  &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
132    &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
133      &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
134      &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
135      &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
136      &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
137      &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
138    },
139    &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. **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**.
140      &quot;A String&quot;,
141    ],
142    &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.
143    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
144    &quot;offload&quot;: True or False, # Option for export offload.
145    &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
146      &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
147        &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, and --set-gtid-purged is set to ON. If set to **2**, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than **1**, --set-gtid-purged is set to OFF.
148      },
149      &quot;schemaOnly&quot;: True or False, # Export only schemas.
150      &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.
151        &quot;A String&quot;,
152      ],
153    },
154    &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 request succeeds, but the operation fails. If **fileType** is **SQL** and the filename ends with .gz, the contents are compressed.
155  },
156  &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
157    &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
158      &quot;encryptionOptions&quot;: {
159        &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.
160        &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
161        &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.
162      },
163    },
164    &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
165      &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.
166        &quot;A String&quot;,
167      ],
168      &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
169      &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
170      &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
171      &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
172      &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
173    },
174    &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.
175    &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.
176    &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
177    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
178    &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.
179  },
180  &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
181  &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
182  &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.
183  &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**
184  &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
185  &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
186  &quot;status&quot;: &quot;A String&quot;, # The status of an operation.
187  &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
188  &quot;targetLink&quot;: &quot;A String&quot;,
189  &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
190  &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
191}</pre>
192</div>
193
194<div class="method">
195    <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
196  <pre>Creates a new user in a Cloud SQL instance.
197
198Args:
199  project: string, Project ID of the project that contains the instance. (required)
200  instance: string, Database instance ID. This does not include the project ID. (required)
201  body: object, The request body.
202    The object takes the form of:
203
204{ # A Cloud SQL user resource.
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;, # Optional. 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. For a MySQL instance, it&#x27;s required; for a PostgreSQL or SQL Server instance, it&#x27;s optional.
207  &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.
208  &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#user**.
209  &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.
210  &quot;password&quot;: &quot;A String&quot;, # The password for the user.
211  &quot;passwordPolicy&quot;: { # User level password validation policy. # User level password validation policy.
212    &quot;allowedFailedAttempts&quot;: 42, # Number of failed login attempts allowed before user get locked.
213    &quot;enableFailedAttemptsCheck&quot;: True or False, # If true, failed login attempts check will be enabled.
214    &quot;passwordExpirationDuration&quot;: &quot;A String&quot;, # Expiration duration after password is updated.
215    &quot;status&quot;: { # Read-only password status. # Output only. Read-only password status.
216      &quot;locked&quot;: True or False, # If true, user does not have login privileges.
217      &quot;passwordExpirationTime&quot;: &quot;A String&quot;, # The expiration time of the current password.
218    },
219  },
220  &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.
221  &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
222    &quot;disabled&quot;: True or False, # If the user has been disabled
223    &quot;serverRoles&quot;: [ # The server roles for this user
224      &quot;A String&quot;,
225    ],
226  },
227  &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.
228}
229
230  x__xgafv: string, V1 error format.
231    Allowed values
232      1 - v1 error format
233      2 - v2 error format
234
235Returns:
236  An object of the form:
237
238    { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
239  &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
240    &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
241    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
242  },
243  &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
244  &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
245    &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
246      { # Database instance operation error.
247        &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
248        &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
249        &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
250      },
251    ],
252    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
253  },
254  &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
255    &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
256      &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
257      &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
258      &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
259      &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
260      &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
261    },
262    &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. **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**.
263      &quot;A String&quot;,
264    ],
265    &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.
266    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
267    &quot;offload&quot;: True or False, # Option for export offload.
268    &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
269      &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
270        &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, and --set-gtid-purged is set to ON. If set to **2**, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than **1**, --set-gtid-purged is set to OFF.
271      },
272      &quot;schemaOnly&quot;: True or False, # Export only schemas.
273      &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.
274        &quot;A String&quot;,
275      ],
276    },
277    &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 request succeeds, but the operation fails. If **fileType** is **SQL** and the filename ends with .gz, the contents are compressed.
278  },
279  &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
280    &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
281      &quot;encryptionOptions&quot;: {
282        &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.
283        &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
284        &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.
285      },
286    },
287    &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
288      &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.
289        &quot;A String&quot;,
290      ],
291      &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
292      &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
293      &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
294      &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
295      &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
296    },
297    &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.
298    &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.
299    &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
300    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
301    &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.
302  },
303  &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
304  &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
305  &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.
306  &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**
307  &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
308  &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
309  &quot;status&quot;: &quot;A String&quot;, # The status of an operation.
310  &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
311  &quot;targetLink&quot;: &quot;A String&quot;,
312  &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
313  &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
314}</pre>
315</div>
316
317<div class="method">
318    <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
319  <pre>Lists users in the specified Cloud SQL instance.
320
321Args:
322  project: string, Project ID of the project that contains the instance. (required)
323  instance: string, Database instance ID. This does not include the project ID. (required)
324  x__xgafv: string, V1 error format.
325    Allowed values
326      1 - v1 error format
327      2 - v2 error format
328
329Returns:
330  An object of the form:
331
332    { # User list response.
333  &quot;items&quot;: [ # List of user resources in the instance.
334    { # A Cloud SQL user resource.
335      &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
336      &quot;host&quot;: &quot;A String&quot;, # Optional. 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. For a MySQL instance, it&#x27;s required; for a PostgreSQL or SQL Server instance, it&#x27;s optional.
337      &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.
338      &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#user**.
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;password&quot;: &quot;A String&quot;, # The password for the user.
341      &quot;passwordPolicy&quot;: { # User level password validation policy. # User level password validation policy.
342        &quot;allowedFailedAttempts&quot;: 42, # Number of failed login attempts allowed before user get locked.
343        &quot;enableFailedAttemptsCheck&quot;: True or False, # If true, failed login attempts check will be enabled.
344        &quot;passwordExpirationDuration&quot;: &quot;A String&quot;, # Expiration duration after password is updated.
345        &quot;status&quot;: { # Read-only password status. # Output only. Read-only password status.
346          &quot;locked&quot;: True or False, # If true, user does not have login privileges.
347          &quot;passwordExpirationTime&quot;: &quot;A String&quot;, # The expiration time of the current password.
348        },
349      },
350      &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.
351      &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
352        &quot;disabled&quot;: True or False, # If the user has been disabled
353        &quot;serverRoles&quot;: [ # The server roles for this user
354          &quot;A String&quot;,
355        ],
356      },
357      &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.
358    },
359  ],
360  &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#usersList**.
361  &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.
362}</pre>
363</div>
364
365<div class="method">
366    <code class="details" id="update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</code>
367  <pre>Updates an existing user in a Cloud SQL instance.
368
369Args:
370  project: string, Project ID of the project that contains the instance. (required)
371  instance: string, Database instance ID. This does not include the project ID. (required)
372  body: object, The request body.
373    The object takes the form of:
374
375{ # A Cloud SQL user resource.
376  &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
377  &quot;host&quot;: &quot;A String&quot;, # Optional. 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. For a MySQL instance, it&#x27;s required; for a PostgreSQL or SQL Server instance, it&#x27;s optional.
378  &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.
379  &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#user**.
380  &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.
381  &quot;password&quot;: &quot;A String&quot;, # The password for the user.
382  &quot;passwordPolicy&quot;: { # User level password validation policy. # User level password validation policy.
383    &quot;allowedFailedAttempts&quot;: 42, # Number of failed login attempts allowed before user get locked.
384    &quot;enableFailedAttemptsCheck&quot;: True or False, # If true, failed login attempts check will be enabled.
385    &quot;passwordExpirationDuration&quot;: &quot;A String&quot;, # Expiration duration after password is updated.
386    &quot;status&quot;: { # Read-only password status. # Output only. Read-only password status.
387      &quot;locked&quot;: True or False, # If true, user does not have login privileges.
388      &quot;passwordExpirationTime&quot;: &quot;A String&quot;, # The expiration time of the current password.
389    },
390  },
391  &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.
392  &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
393    &quot;disabled&quot;: True or False, # If the user has been disabled
394    &quot;serverRoles&quot;: [ # The server roles for this user
395      &quot;A String&quot;,
396    ],
397  },
398  &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.
399}
400
401  host: string, Optional. Host of the user in the instance.
402  name: string, Name of the user in the instance.
403  x__xgafv: string, V1 error format.
404    Allowed values
405      1 - v1 error format
406      2 - v2 error format
407
408Returns:
409  An object of the form:
410
411    { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
412  &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
413    &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
414    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
415  },
416  &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
417  &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
418    &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
419      { # Database instance operation error.
420        &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
421        &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
422        &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
423      },
424    ],
425    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
426  },
427  &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
428    &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
429      &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
430      &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
431      &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
432      &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
433      &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
434    },
435    &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. **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**.
436      &quot;A String&quot;,
437    ],
438    &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.
439    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
440    &quot;offload&quot;: True or False, # Option for export offload.
441    &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
442      &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
443        &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, and --set-gtid-purged is set to ON. If set to **2**, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than **1**, --set-gtid-purged is set to OFF.
444      },
445      &quot;schemaOnly&quot;: True or False, # Export only schemas.
446      &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.
447        &quot;A String&quot;,
448      ],
449    },
450    &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 request succeeds, but the operation fails. If **fileType** is **SQL** and the filename ends with .gz, the contents are compressed.
451  },
452  &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
453    &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
454      &quot;encryptionOptions&quot;: {
455        &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.
456        &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
457        &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.
458      },
459    },
460    &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
461      &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.
462        &quot;A String&quot;,
463      ],
464      &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
465      &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
466      &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
467      &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
468      &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
469    },
470    &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.
471    &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.
472    &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
473    &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
474    &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.
475  },
476  &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
477  &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
478  &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.
479  &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**
480  &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
481  &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
482  &quot;status&quot;: &quot;A String&quot;, # The status of an operation.
483  &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
484  &quot;targetLink&quot;: &quot;A String&quot;,
485  &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
486  &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
487}</pre>
488</div>
489
490</body></html>