Debian Codegraph @

docs/dyn/sqladmin_v1beta4.users.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.users.html">users</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#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="#get">get(project, instance, name, host=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Retrieves a resource containing information about a user.</p>
86 <p class="toc_element">
87 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Creates a new user in a Cloud SQL instance.</p>
89 <p class="toc_element">
90 <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
91 <p class="firstline">Lists users in the specified Cloud SQL instance.</p>
92 <p class="toc_element">
93 <code><a href="#update">update(project, instance, body=None, databaseRoles=None, host=None, name=None, revokeExistingRoles=None, x__xgafv=None)</a></code></p>
94 <p class="firstline">Updates an existing user in a Cloud SQL instance.</p>
95 <h3>Method Details</h3>
96 <div class="method">
97 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99 </div>
100
101 <div class="method">
102 <code class="details" id="delete">delete(project, instance, host=None, name=None, x__xgafv=None)</code>
103 <pre>Deletes a user from a Cloud SQL instance.
104
105 Args:
106 project: string, Project ID of the project that contains the instance. (required)
107 instance: string, Database instance ID. This does not include the project ID. (required)
108 host: string, Host of the user in the instance.
109 name: string, Name of the user in the instance.
110 x__xgafv: string, V1 error format.
111 Allowed values
112 1 - v1 error format
113 2 - v2 error format
114
115 Returns:
116 An object of the form:
117
118 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
119 &quot;acquireSsrsLeaseContext&quot;: { # Acquire SSRS lease context. # The context for acquire SSRS lease operation, if applicable.
120 &quot;duration&quot;: &quot;A String&quot;, # Lease duration needed for the SSRS setup.
121 &quot;reportDatabase&quot;: &quot;A String&quot;, # The report database to be used for the SSRS setup.
122 &quot;serviceLogin&quot;: &quot;A String&quot;, # The username to be used as the service login to connect to the report database for SSRS setup.
123 &quot;setupLogin&quot;: &quot;A String&quot;, # The username to be used as the setup login to connect to the database server for SSRS setup.
124 },
125 &quot;apiWarning&quot;: { # An Admin API warning message. # An Admin API warning message.
126 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
127 &quot;message&quot;: &quot;A String&quot;, # The warning message.
128 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
129 },
130 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
131 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
132 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#backupContext`.
133 &quot;name&quot;: &quot;A String&quot;, # The name of the backup. Format: projects/{project}/backups/{backup}
134 },
135 &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`.
136 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
137 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
138 { # Database instance operation error.
139 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
140 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationError`.
141 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
142 },
143 ],
144 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationErrors`.
145 },
146 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
147 &quot;bakExportOptions&quot;: { # Options for exporting BAK files (SQL Server-only)
148 &quot;bakType&quot;: &quot;A String&quot;, # Type of this bak file will be export, FULL or DIFF, SQL Server only
149 &quot;copyOnly&quot;: True or False, # Deprecated: copy_only is deprecated. Use differential_base instead
150 &quot;differentialBase&quot;: True or False, # Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base
151 &quot;exportLogEndTime&quot;: &quot;A String&quot;, # Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.
152 &quot;exportLogStartTime&quot;: &quot;A String&quot;, # Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.
153 &quot;stripeCount&quot;: 42, # Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.
154 &quot;striped&quot;: True or False, # Whether or not the export should be striped.
155 },
156 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
157 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
158 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
159 &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.
160 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
161 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
162 },
163 &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:` If you don&#x27;t specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. 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`.
164 &quot;A String&quot;,
165 ],
166 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.
167 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#exportContext`.
168 &quot;offload&quot;: True or False, # Whether to perform a serverless export.
169 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
170 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
171 &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.
172 },
173 &quot;parallel&quot;: True or False, # Optional. Whether or not the export should be parallel.
174 &quot;postgresExportOptions&quot;: { # Options for exporting from a Cloud SQL for PostgreSQL instance.
175 &quot;clean&quot;: True or False, # Optional. Use this option to include DROP &lt;object&gt; SQL statements. Use these statements to delete database objects before running the import operation.
176 &quot;ifExists&quot;: True or False, # Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.
177 },
178 &quot;schemaOnly&quot;: True or False, # Export only schemas.
179 &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.
180 &quot;A String&quot;,
181 ],
182 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel export.
183 },
184 &quot;tdeExportOptions&quot;: { # Optional. Export parameters specific to SQL Server TDE certificates
185 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
186 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
187 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
188 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
189 },
190 &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.
191 },
192 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
193 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
194 &quot;bakType&quot;: &quot;A String&quot;, # Type of the bak content, FULL or DIFF.
195 &quot;encryptionOptions&quot;: {
196 &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.
197 &quot;keepEncrypted&quot;: True or False, # Optional. Whether the imported file remains encrypted.
198 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
199 &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.
200 },
201 &quot;noRecovery&quot;: True or False, # Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.
202 &quot;recoveryOnly&quot;: True or False, # Whether or not the backup importing request will just bring database online without downloading Bak content only one of &quot;no_recovery&quot; and &quot;recovery_only&quot; can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.
203 &quot;stopAt&quot;: &quot;A String&quot;, # Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.
204 &quot;stopAtMark&quot;: &quot;A String&quot;, # Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.
205 &quot;striped&quot;: True or False, # Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.
206 },
207 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
208 &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.
209 &quot;A String&quot;,
210 ],
211 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
212 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
213 &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.
214 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
215 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
216 },
217 &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. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.
218 &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. * `BAK`: The file contains backup data for a SQL Server instance.
219 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
220 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#importContext`.
221 &quot;sqlImportOptions&quot;: { # Optional. Options for importing data from SQL statements.
222 &quot;parallel&quot;: True or False, # Optional. Whether or not the import should be parallel.
223 &quot;postgresImportOptions&quot;: { # Optional. Options for importing from a Cloud SQL for PostgreSQL instance.
224 &quot;clean&quot;: True or False, # Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
225 &quot;ifExists&quot;: True or False, # Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
226 },
227 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel import.
228 },
229 &quot;tdeImportOptions&quot;: { # Optional. Import parameters specific to SQL Server .TDE files Import parameters specific to SQL Server TDE certificates
230 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
231 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
232 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
233 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
234 },
235 &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.
236 },
237 &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`.
238 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operation`.
239 &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.
240 &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`
241 &quot;preCheckMajorVersionUpgradeContext&quot;: { # Pre-check major version upgrade context. # The context for pre-check major version upgrade operation, if applicable. This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).
242 &quot;kind&quot;: &quot;A String&quot;, # Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.
243 &quot;preCheckResponse&quot;: [ # Output only. The responses from the precheck operation.
244 { # Structured PreCheckResponse containing message, type, and required actions.
245 &quot;actionsRequired&quot;: [ # The actions that the user needs to take. Use repeated for multiple actions.
246 &quot;A String&quot;,
247 ],
248 &quot;message&quot;: &quot;A String&quot;, # The message to be displayed to the user.
249 &quot;messageType&quot;: &quot;A String&quot;, # The type of message whether it is an info, warning, or error.
250 },
251 ],
252 &quot;targetDatabaseVersion&quot;: &quot;A String&quot;, # Required. The target database version to upgrade to.
253 },
254 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
255 &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`.
256 &quot;status&quot;: &quot;A String&quot;, # The status of an operation.
257 &quot;subOperationType&quot;: { # The sub operation type based on the operation type. # Optional. The sub operation based on the operation type.
258 &quot;maintenanceType&quot;: &quot;A String&quot;, # The type of maintenance to be performed on the instance.
259 },
260 &quot;targetId&quot;: &quot;A String&quot;, # Name of the resource on which this operation runs.
261 &quot;targetLink&quot;: &quot;A String&quot;,
262 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
263 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
264 }</pre>
265 </div>
266
267 <div class="method">
268 <code class="details" id="get">get(project, instance, name, host=None, x__xgafv=None)</code>
269 <pre>Retrieves a resource containing information about a user.
270
271 Args:
272 project: string, Project ID of the project that contains the instance. (required)
273 instance: string, Database instance ID. This does not include the project ID. (required)
274 name: string, User of the instance. (required)
275 host: string, Host of a user of the instance.
276 x__xgafv: string, V1 error format.
277 Allowed values
278 1 - v1 error format
279 2 - v2 error format
280
281 Returns:
282 An object of the form:
283
284 { # A Cloud SQL user resource.
285 &quot;databaseRoles&quot;: [ # Optional. Role memberships of the user
286 &quot;A String&quot;,
287 ],
288 &quot;dualPasswordType&quot;: &quot;A String&quot;, # Dual password status for the user.
289 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
290 &quot;host&quot;: &quot;A String&quot;, # Optional. The host 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.
291 &quot;iamEmail&quot;: &quot;A String&quot;, # Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.
292 &quot;iamStatus&quot;: &quot;A String&quot;, # Indicates if a group is active or inactive for IAM database authentication.
293 &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* because it is already specified on the URL.
294 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#user`.
295 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.
296 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
297 &quot;passwordPolicy&quot;: { # User level password validation policy. # User level password validation policy.
298 &quot;allowedFailedAttempts&quot;: 42, # Number of failed login attempts allowed before user get locked.
299 &quot;enableFailedAttemptsCheck&quot;: True or False, # If true, failed login attempts check will be enabled.
300 &quot;enablePasswordVerification&quot;: True or False, # If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
301 &quot;passwordExpirationDuration&quot;: &quot;A String&quot;, # Expiration duration after password is updated.
302 &quot;status&quot;: { # Read-only password status. # Output only. Read-only password status.
303 &quot;locked&quot;: True or False, # If true, user does not have login privileges.
304 &quot;passwordExpirationTime&quot;: &quot;A String&quot;, # The expiration time of the current password.
305 },
306 },
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* because it is already specified on the URL.
308 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
309 &quot;disabled&quot;: True or False, # If the user has been disabled
310 &quot;serverRoles&quot;: [ # The server roles for this user
311 &quot;A String&quot;,
312 ],
313 },
314 &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.
315 }</pre>
316 </div>
317
318 <div class="method">
319 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
320 <pre>Creates a new user in a Cloud SQL instance.
321
322 Args:
323 project: string, Project ID of the project that contains the instance. (required)
324 instance: string, Database instance ID. This does not include the project ID. (required)
325 body: object, The request body.
326 The object takes the form of:
327
328 { # A Cloud SQL user resource.
329 &quot;databaseRoles&quot;: [ # Optional. Role memberships of the user
330 &quot;A String&quot;,
331 ],
332 &quot;dualPasswordType&quot;: &quot;A String&quot;, # Dual password status for the user.
333 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
334 &quot;host&quot;: &quot;A String&quot;, # Optional. The host 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.
335 &quot;iamEmail&quot;: &quot;A String&quot;, # Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.
336 &quot;iamStatus&quot;: &quot;A String&quot;, # Indicates if a group is active or inactive for IAM database authentication.
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* because 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` because 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;enablePasswordVerification&quot;: True or False, # If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
345 &quot;passwordExpirationDuration&quot;: &quot;A String&quot;, # Expiration duration after password is updated.
346 &quot;status&quot;: { # Read-only password status. # Output only. Read-only password status.
347 &quot;locked&quot;: True or False, # If true, user does not have login privileges.
348 &quot;passwordExpirationTime&quot;: &quot;A String&quot;, # The expiration time of the current password.
349 },
350 },
351 &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* because it is already specified on the URL.
352 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
353 &quot;disabled&quot;: True or False, # If the user has been disabled
354 &quot;serverRoles&quot;: [ # The server roles for this user
355 &quot;A String&quot;,
356 ],
357 },
358 &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.
359 }
360
361 x__xgafv: string, V1 error format.
362 Allowed values
363 1 - v1 error format
364 2 - v2 error format
365
366 Returns:
367 An object of the form:
368
369 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
370 &quot;acquireSsrsLeaseContext&quot;: { # Acquire SSRS lease context. # The context for acquire SSRS lease operation, if applicable.
371 &quot;duration&quot;: &quot;A String&quot;, # Lease duration needed for the SSRS setup.
372 &quot;reportDatabase&quot;: &quot;A String&quot;, # The report database to be used for the SSRS setup.
373 &quot;serviceLogin&quot;: &quot;A String&quot;, # The username to be used as the service login to connect to the report database for SSRS setup.
374 &quot;setupLogin&quot;: &quot;A String&quot;, # The username to be used as the setup login to connect to the database server for SSRS setup.
375 },
376 &quot;apiWarning&quot;: { # An Admin API warning message. # An Admin API warning message.
377 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
378 &quot;message&quot;: &quot;A String&quot;, # The warning message.
379 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
380 },
381 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
382 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
383 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#backupContext`.
384 &quot;name&quot;: &quot;A String&quot;, # The name of the backup. Format: projects/{project}/backups/{backup}
385 },
386 &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`.
387 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
388 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
389 { # Database instance operation error.
390 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
391 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationError`.
392 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
393 },
394 ],
395 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationErrors`.
396 },
397 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
398 &quot;bakExportOptions&quot;: { # Options for exporting BAK files (SQL Server-only)
399 &quot;bakType&quot;: &quot;A String&quot;, # Type of this bak file will be export, FULL or DIFF, SQL Server only
400 &quot;copyOnly&quot;: True or False, # Deprecated: copy_only is deprecated. Use differential_base instead
401 &quot;differentialBase&quot;: True or False, # Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base
402 &quot;exportLogEndTime&quot;: &quot;A String&quot;, # Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.
403 &quot;exportLogStartTime&quot;: &quot;A String&quot;, # Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.
404 &quot;stripeCount&quot;: 42, # Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.
405 &quot;striped&quot;: True or False, # Whether or not the export should be striped.
406 },
407 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
408 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
409 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
410 &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.
411 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
412 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
413 },
414 &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:` If you don&#x27;t specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. 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`.
415 &quot;A String&quot;,
416 ],
417 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.
418 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#exportContext`.
419 &quot;offload&quot;: True or False, # Whether to perform a serverless export.
420 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
421 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
422 &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.
423 },
424 &quot;parallel&quot;: True or False, # Optional. Whether or not the export should be parallel.
425 &quot;postgresExportOptions&quot;: { # Options for exporting from a Cloud SQL for PostgreSQL instance.
426 &quot;clean&quot;: True or False, # Optional. Use this option to include DROP &lt;object&gt; SQL statements. Use these statements to delete database objects before running the import operation.
427 &quot;ifExists&quot;: True or False, # Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.
428 },
429 &quot;schemaOnly&quot;: True or False, # Export only schemas.
430 &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.
431 &quot;A String&quot;,
432 ],
433 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel export.
434 },
435 &quot;tdeExportOptions&quot;: { # Optional. Export parameters specific to SQL Server TDE certificates
436 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
437 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
438 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
439 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
440 },
441 &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.
442 },
443 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
444 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
445 &quot;bakType&quot;: &quot;A String&quot;, # Type of the bak content, FULL or DIFF.
446 &quot;encryptionOptions&quot;: {
447 &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.
448 &quot;keepEncrypted&quot;: True or False, # Optional. Whether the imported file remains encrypted.
449 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
450 &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.
451 },
452 &quot;noRecovery&quot;: True or False, # Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.
453 &quot;recoveryOnly&quot;: True or False, # Whether or not the backup importing request will just bring database online without downloading Bak content only one of &quot;no_recovery&quot; and &quot;recovery_only&quot; can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.
454 &quot;stopAt&quot;: &quot;A String&quot;, # Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.
455 &quot;stopAtMark&quot;: &quot;A String&quot;, # Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.
456 &quot;striped&quot;: True or False, # Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.
457 },
458 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
459 &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.
460 &quot;A String&quot;,
461 ],
462 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
463 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
464 &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.
465 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
466 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
467 },
468 &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. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.
469 &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. * `BAK`: The file contains backup data for a SQL Server instance.
470 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
471 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#importContext`.
472 &quot;sqlImportOptions&quot;: { # Optional. Options for importing data from SQL statements.
473 &quot;parallel&quot;: True or False, # Optional. Whether or not the import should be parallel.
474 &quot;postgresImportOptions&quot;: { # Optional. Options for importing from a Cloud SQL for PostgreSQL instance.
475 &quot;clean&quot;: True or False, # Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
476 &quot;ifExists&quot;: True or False, # Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
477 },
478 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel import.
479 },
480 &quot;tdeImportOptions&quot;: { # Optional. Import parameters specific to SQL Server .TDE files Import parameters specific to SQL Server TDE certificates
481 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
482 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
483 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
484 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
485 },
486 &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.
487 },
488 &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`.
489 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operation`.
490 &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.
491 &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`
492 &quot;preCheckMajorVersionUpgradeContext&quot;: { # Pre-check major version upgrade context. # The context for pre-check major version upgrade operation, if applicable. This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).
493 &quot;kind&quot;: &quot;A String&quot;, # Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.
494 &quot;preCheckResponse&quot;: [ # Output only. The responses from the precheck operation.
495 { # Structured PreCheckResponse containing message, type, and required actions.
496 &quot;actionsRequired&quot;: [ # The actions that the user needs to take. Use repeated for multiple actions.
497 &quot;A String&quot;,
498 ],
499 &quot;message&quot;: &quot;A String&quot;, # The message to be displayed to the user.
500 &quot;messageType&quot;: &quot;A String&quot;, # The type of message whether it is an info, warning, or error.
501 },
502 ],
503 &quot;targetDatabaseVersion&quot;: &quot;A String&quot;, # Required. The target database version to upgrade to.
504 },
505 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
506 &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`.
507 &quot;status&quot;: &quot;A String&quot;, # The status of an operation.
508 &quot;subOperationType&quot;: { # The sub operation type based on the operation type. # Optional. The sub operation based on the operation type.
509 &quot;maintenanceType&quot;: &quot;A String&quot;, # The type of maintenance to be performed on the instance.
510 },
511 &quot;targetId&quot;: &quot;A String&quot;, # Name of the resource on which this operation runs.
512 &quot;targetLink&quot;: &quot;A String&quot;,
513 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
514 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
515 }</pre>
516 </div>
517
518 <div class="method">
519 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
520 <pre>Lists users in the specified Cloud SQL instance.
521
522 Args:
523 project: string, Project ID of the project that contains the instance. (required)
524 instance: string, Database instance ID. This does not include the project ID. (required)
525 x__xgafv: string, V1 error format.
526 Allowed values
527 1 - v1 error format
528 2 - v2 error format
529
530 Returns:
531 An object of the form:
532
533 { # User list response.
534 &quot;items&quot;: [ # List of user resources in the instance.
535 { # A Cloud SQL user resource.
536 &quot;databaseRoles&quot;: [ # Optional. Role memberships of the user
537 &quot;A String&quot;,
538 ],
539 &quot;dualPasswordType&quot;: &quot;A String&quot;, # Dual password status for the user.
540 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
541 &quot;host&quot;: &quot;A String&quot;, # Optional. The host 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.
542 &quot;iamEmail&quot;: &quot;A String&quot;, # Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.
543 &quot;iamStatus&quot;: &quot;A String&quot;, # Indicates if a group is active or inactive for IAM database authentication.
544 &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* because it is already specified on the URL.
545 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#user`.
546 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.
547 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
548 &quot;passwordPolicy&quot;: { # User level password validation policy. # User level password validation policy.
549 &quot;allowedFailedAttempts&quot;: 42, # Number of failed login attempts allowed before user get locked.
550 &quot;enableFailedAttemptsCheck&quot;: True or False, # If true, failed login attempts check will be enabled.
551 &quot;enablePasswordVerification&quot;: True or False, # If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
552 &quot;passwordExpirationDuration&quot;: &quot;A String&quot;, # Expiration duration after password is updated.
553 &quot;status&quot;: { # Read-only password status. # Output only. Read-only password status.
554 &quot;locked&quot;: True or False, # If true, user does not have login privileges.
555 &quot;passwordExpirationTime&quot;: &quot;A String&quot;, # The expiration time of the current password.
556 },
557 },
558 &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* because it is already specified on the URL.
559 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
560 &quot;disabled&quot;: True or False, # If the user has been disabled
561 &quot;serverRoles&quot;: [ # The server roles for this user
562 &quot;A String&quot;,
563 ],
564 },
565 &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.
566 },
567 ],
568 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#usersList*.
569 &quot;nextPageToken&quot;: &quot;A String&quot;, # Unused.
570 }</pre>
571 </div>
572
573 <div class="method">
574 <code class="details" id="update">update(project, instance, body=None, databaseRoles=None, host=None, name=None, revokeExistingRoles=None, x__xgafv=None)</code>
575 <pre>Updates an existing user in a Cloud SQL instance.
576
577 Args:
578 project: string, Project ID of the project that contains the instance. (required)
579 instance: string, Database instance ID. This does not include the project ID. (required)
580 body: object, The request body.
581 The object takes the form of:
582
583 { # A Cloud SQL user resource.
584 &quot;databaseRoles&quot;: [ # Optional. Role memberships of the user
585 &quot;A String&quot;,
586 ],
587 &quot;dualPasswordType&quot;: &quot;A String&quot;, # Dual password status for the user.
588 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
589 &quot;host&quot;: &quot;A String&quot;, # Optional. The host 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.
590 &quot;iamEmail&quot;: &quot;A String&quot;, # Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.
591 &quot;iamStatus&quot;: &quot;A String&quot;, # Indicates if a group is active or inactive for IAM database authentication.
592 &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* because it is already specified on the URL.
593 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#user`.
594 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.
595 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
596 &quot;passwordPolicy&quot;: { # User level password validation policy. # User level password validation policy.
597 &quot;allowedFailedAttempts&quot;: 42, # Number of failed login attempts allowed before user get locked.
598 &quot;enableFailedAttemptsCheck&quot;: True or False, # If true, failed login attempts check will be enabled.
599 &quot;enablePasswordVerification&quot;: True or False, # If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
600 &quot;passwordExpirationDuration&quot;: &quot;A String&quot;, # Expiration duration after password is updated.
601 &quot;status&quot;: { # Read-only password status. # Output only. Read-only password status.
602 &quot;locked&quot;: True or False, # If true, user does not have login privileges.
603 &quot;passwordExpirationTime&quot;: &quot;A String&quot;, # The expiration time of the current password.
604 },
605 },
606 &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* because it is already specified on the URL.
607 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
608 &quot;disabled&quot;: True or False, # If the user has been disabled
609 &quot;serverRoles&quot;: [ # The server roles for this user
610 &quot;A String&quot;,
611 ],
612 },
613 &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.
614 }
615
616 databaseRoles: string, Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request. (repeated)
617 host: string, Optional. Host of the user in the instance.
618 name: string, Name of the user in the instance.
619 revokeExistingRoles: boolean, Optional. Specifies whether to revoke existing roles that are not present in the `database_roles` field. If `false` or unset, the database roles specified in `database_roles` are added to the user&#x27;s existing roles.
620 x__xgafv: string, V1 error format.
621 Allowed values
622 1 - v1 error format
623 2 - v2 error format
624
625 Returns:
626 An object of the form:
627
628 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
629 &quot;acquireSsrsLeaseContext&quot;: { # Acquire SSRS lease context. # The context for acquire SSRS lease operation, if applicable.
630 &quot;duration&quot;: &quot;A String&quot;, # Lease duration needed for the SSRS setup.
631 &quot;reportDatabase&quot;: &quot;A String&quot;, # The report database to be used for the SSRS setup.
632 &quot;serviceLogin&quot;: &quot;A String&quot;, # The username to be used as the service login to connect to the report database for SSRS setup.
633 &quot;setupLogin&quot;: &quot;A String&quot;, # The username to be used as the setup login to connect to the database server for SSRS setup.
634 },
635 &quot;apiWarning&quot;: { # An Admin API warning message. # An Admin API warning message.
636 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
637 &quot;message&quot;: &quot;A String&quot;, # The warning message.
638 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
639 },
640 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
641 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
642 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#backupContext`.
643 &quot;name&quot;: &quot;A String&quot;, # The name of the backup. Format: projects/{project}/backups/{backup}
644 },
645 &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`.
646 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
647 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
648 { # Database instance operation error.
649 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
650 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationError`.
651 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
652 },
653 ],
654 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationErrors`.
655 },
656 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
657 &quot;bakExportOptions&quot;: { # Options for exporting BAK files (SQL Server-only)
658 &quot;bakType&quot;: &quot;A String&quot;, # Type of this bak file will be export, FULL or DIFF, SQL Server only
659 &quot;copyOnly&quot;: True or False, # Deprecated: copy_only is deprecated. Use differential_base instead
660 &quot;differentialBase&quot;: True or False, # Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base
661 &quot;exportLogEndTime&quot;: &quot;A String&quot;, # Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.
662 &quot;exportLogStartTime&quot;: &quot;A String&quot;, # Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.
663 &quot;stripeCount&quot;: 42, # Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.
664 &quot;striped&quot;: True or False, # Whether or not the export should be striped.
665 },
666 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
667 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
668 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
669 &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.
670 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
671 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
672 },
673 &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:` If you don&#x27;t specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. 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`.
674 &quot;A String&quot;,
675 ],
676 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.
677 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#exportContext`.
678 &quot;offload&quot;: True or False, # Whether to perform a serverless export.
679 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
680 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
681 &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.
682 },
683 &quot;parallel&quot;: True or False, # Optional. Whether or not the export should be parallel.
684 &quot;postgresExportOptions&quot;: { # Options for exporting from a Cloud SQL for PostgreSQL instance.
685 &quot;clean&quot;: True or False, # Optional. Use this option to include DROP &lt;object&gt; SQL statements. Use these statements to delete database objects before running the import operation.
686 &quot;ifExists&quot;: True or False, # Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.
687 },
688 &quot;schemaOnly&quot;: True or False, # Export only schemas.
689 &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.
690 &quot;A String&quot;,
691 ],
692 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel export.
693 },
694 &quot;tdeExportOptions&quot;: { # Optional. Export parameters specific to SQL Server TDE certificates
695 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
696 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
697 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
698 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
699 },
700 &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.
701 },
702 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
703 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
704 &quot;bakType&quot;: &quot;A String&quot;, # Type of the bak content, FULL or DIFF.
705 &quot;encryptionOptions&quot;: {
706 &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.
707 &quot;keepEncrypted&quot;: True or False, # Optional. Whether the imported file remains encrypted.
708 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
709 &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.
710 },
711 &quot;noRecovery&quot;: True or False, # Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.
712 &quot;recoveryOnly&quot;: True or False, # Whether or not the backup importing request will just bring database online without downloading Bak content only one of &quot;no_recovery&quot; and &quot;recovery_only&quot; can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.
713 &quot;stopAt&quot;: &quot;A String&quot;, # Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.
714 &quot;stopAtMark&quot;: &quot;A String&quot;, # Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.
715 &quot;striped&quot;: True or False, # Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.
716 },
717 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
718 &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.
719 &quot;A String&quot;,
720 ],
721 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
722 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
723 &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.
724 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
725 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
726 },
727 &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. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.
728 &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. * `BAK`: The file contains backup data for a SQL Server instance.
729 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
730 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#importContext`.
731 &quot;sqlImportOptions&quot;: { # Optional. Options for importing data from SQL statements.
732 &quot;parallel&quot;: True or False, # Optional. Whether or not the import should be parallel.
733 &quot;postgresImportOptions&quot;: { # Optional. Options for importing from a Cloud SQL for PostgreSQL instance.
734 &quot;clean&quot;: True or False, # Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
735 &quot;ifExists&quot;: True or False, # Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
736 },
737 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel import.
738 },
739 &quot;tdeImportOptions&quot;: { # Optional. Import parameters specific to SQL Server .TDE files Import parameters specific to SQL Server TDE certificates
740 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
741 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
742 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
743 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
744 },
745 &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.
746 },
747 &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`.
748 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operation`.
749 &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.
750 &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`
751 &quot;preCheckMajorVersionUpgradeContext&quot;: { # Pre-check major version upgrade context. # The context for pre-check major version upgrade operation, if applicable. This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).
752 &quot;kind&quot;: &quot;A String&quot;, # Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.
753 &quot;preCheckResponse&quot;: [ # Output only. The responses from the precheck operation.
754 { # Structured PreCheckResponse containing message, type, and required actions.
755 &quot;actionsRequired&quot;: [ # The actions that the user needs to take. Use repeated for multiple actions.
756 &quot;A String&quot;,
757 ],
758 &quot;message&quot;: &quot;A String&quot;, # The message to be displayed to the user.
759 &quot;messageType&quot;: &quot;A String&quot;, # The type of message whether it is an info, warning, or error.
760 },
761 ],
762 &quot;targetDatabaseVersion&quot;: &quot;A String&quot;, # Required. The target database version to upgrade to.
763 },
764 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
765 &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`.
766 &quot;status&quot;: &quot;A String&quot;, # The status of an operation.
767 &quot;subOperationType&quot;: { # The sub operation type based on the operation type. # Optional. The sub operation based on the operation type.
768 &quot;maintenanceType&quot;: &quot;A String&quot;, # The type of maintenance to be performed on the instance.
769 },
770 &quot;targetId&quot;: &quot;A String&quot;, # Name of the resource on which this operation runs.
771 &quot;targetLink&quot;: &quot;A String&quot;,
772 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
773 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
774 }</pre>
775 </div>
776
777 </body></html>