blob: 03aa57f3c45aa9b2bbc902189e50b3b7b03d5350 [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.users.html">users</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#delete">delete(project, instance, host=None, name=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080082<p class="firstline">Deletes a user from a Cloud SQL instance.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080085<p class="firstline">Creates a new user in a Cloud SQL instance.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Lists users in the specified Cloud SQL instance.</p>
89<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070090 <code><a href="#update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080091<p class="firstline">Updates an existing user in a Cloud SQL instance.</p>
92<h3>Method Details</h3>
93<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094 <code class="details" id="close">close()</code>
95 <pre>Close httplib2 connections.</pre>
96</div>
97
98<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code class="details" id="delete">delete(project, instance, host=None, name=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800100 <pre>Deletes a user from a Cloud SQL instance.
101
102Args:
103 project: string, Project ID of the project that contains the instance. (required)
104 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 host: string, Host of the user in the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700106 name: string, Name of the user in the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700107 x__xgafv: string, V1 error format.
108 Allowed values
109 1 - v1 error format
110 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800111
112Returns:
113 An object of the form:
114
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700115 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
116 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
117 &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.
118 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
119 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700120 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
121 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700122 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700127 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700129 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
130 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
131 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700133 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
134 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
135 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700136 &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.
137 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
138 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800141 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700142 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700144 &quot;schemaOnly&quot;: True or False, # Export only schemas.
145 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800147 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 },
Craig Citroe633be12015-03-02 13:40:36 -0800151 },
152 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700153 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700154 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
155 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
156 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700157 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700158 &quot;targetLink&quot;: &quot;A String&quot;,
159 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
160 &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.
161 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
162 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
163 &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.
164 &quot;A String&quot;,
165 ],
166 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
167 },
168 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
169 &quot;encryptionOptions&quot;: {
170 &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.
171 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
172 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
173 },
174 },
175 &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.
176 &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.
177 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
178 },
Craig Citroe633be12015-03-02 13:40:36 -0800179 }</pre>
180</div>
181
182<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800184 <pre>Creates a new user in a Cloud SQL instance.
185
186Args:
187 project: string, Project ID of the project that contains the instance. (required)
188 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800190 The object takes the form of:
191
192{ # A Cloud SQL user resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700193 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
194 &quot;serverRoles&quot;: [ # The server roles for this user
195 &quot;A String&quot;,
196 ],
197 &quot;disabled&quot;: True or False, # If the user has been disabled
198 },
199 &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.
200 &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.
201 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For *insert* operations, host defaults to an empty string. For *update* operations, host is specified as part of the request URL. The host name cannot be updated after insertion.
202 &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.
203 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
204 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
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;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.
207}
Craig Citroe633be12015-03-02 13:40:36 -0800208
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 x__xgafv: string, V1 error format.
210 Allowed values
211 1 - v1 error format
212 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800213
214Returns:
215 An object of the form:
216
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700217 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
218 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
219 &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.
220 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
221 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
223 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700225 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700226 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700227 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700229 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700231 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
232 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
233 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700235 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
236 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
237 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700238 &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.
239 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
240 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
241 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700242 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800243 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700244 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700246 &quot;schemaOnly&quot;: True or False, # Export only schemas.
247 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800249 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700251 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 },
Craig Citroe633be12015-03-02 13:40:36 -0800253 },
254 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700255 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700256 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
257 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
258 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700259 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700260 &quot;targetLink&quot;: &quot;A String&quot;,
261 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
262 &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.
263 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
264 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
265 &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.
266 &quot;A String&quot;,
267 ],
268 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
269 },
270 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
271 &quot;encryptionOptions&quot;: {
272 &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.
273 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
274 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
275 },
276 },
277 &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.
278 &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.
279 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
280 },
Craig Citroe633be12015-03-02 13:40:36 -0800281 }</pre>
282</div>
283
284<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700285 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800286 <pre>Lists users in the specified Cloud SQL instance.
287
288Args:
289 project: string, Project ID of the project that contains the instance. (required)
290 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 x__xgafv: string, V1 error format.
292 Allowed values
293 1 - v1 error format
294 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800295
296Returns:
297 An object of the form:
298
299 { # User list response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700300 &quot;nextPageToken&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 &quot;items&quot;: [ # List of user resources in the instance.
Craig Citroe633be12015-03-02 13:40:36 -0800302 { # A Cloud SQL user resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700303 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
304 &quot;serverRoles&quot;: [ # The server roles for this user
305 &quot;A String&quot;,
306 ],
307 &quot;disabled&quot;: True or False, # If the user has been disabled
Craig Citroe633be12015-03-02 13:40:36 -0800308 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700309 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL.
310 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for *update* since it is already specified on the URL.
311 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For *insert* operations, host defaults to an empty string. For *update* operations, host is specified as part of the request URL. The host name cannot be updated after insertion.
312 &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.
313 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
314 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
315 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
316 &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.
317 },
Craig Citroe633be12015-03-02 13:40:36 -0800318 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700319 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#usersList*.
Craig Citroe633be12015-03-02 13:40:36 -0800320 }</pre>
321</div>
322
323<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700324 <code class="details" id="update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800325 <pre>Updates an existing user in a Cloud SQL instance.
326
327Args:
328 project: string, Project ID of the project that contains the instance. (required)
329 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700330 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800331 The object takes the form of:
332
333{ # A Cloud SQL user resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700334 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
335 &quot;serverRoles&quot;: [ # The server roles for this user
336 &quot;A String&quot;,
337 ],
338 &quot;disabled&quot;: True or False, # If the user has been disabled
339 },
340 &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.
341 &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.
342 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For *insert* operations, host defaults to an empty string. For *update* operations, host is specified as part of the request URL. The host name cannot be updated after insertion.
343 &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.
344 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
345 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
346 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
347 &quot;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.
348}
Craig Citroe633be12015-03-02 13:40:36 -0800349
Dan O'Mearadd494642020-05-01 07:42:23 -0700350 host: string, Optional. Host of the user in the instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 name: string, Name of the user in the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 x__xgafv: string, V1 error format.
353 Allowed values
354 1 - v1 error format
355 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800356
357Returns:
358 An object of the form:
359
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700360 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
361 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
362 &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.
363 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
364 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
366 { # Database instance operation error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700368 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700371 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700372 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700374 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
375 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
376 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700378 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
379 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
380 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700381 &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.
382 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
383 &quot;uri&quot;: &quot;A String&quot;, # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs: //bucketName/fileName*. If the file already exists, the requests // succeeds, but the operation fails. If *fileType* is // *SQL* and the filename ends with .gz, the contents are // compressed.
384 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700385 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800386 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700387 &quot;offload&quot;: True or False, # Option for export offload.
Bu Sun Kim65020912020-05-20 12:08:20 -0700388 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700389 &quot;schemaOnly&quot;: True or False, # Export only schemas.
390 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 &quot;A String&quot;,
Craig Citroe633be12015-03-02 13:40:36 -0800392 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700393 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700394 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to *1*, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 },
Craig Citroe633be12015-03-02 13:40:36 -0800396 },
397 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700398 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700399 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
400 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
401 &quot;operationType&quot;: &quot;A String&quot;, # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE*
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700402 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700403 &quot;targetLink&quot;: &quot;A String&quot;,
404 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
405 &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.
406 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
407 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
408 &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.
409 &quot;A String&quot;,
410 ],
411 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
412 },
413 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
414 &quot;encryptionOptions&quot;: {
415 &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.
416 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
417 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
418 },
419 },
420 &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.
421 &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.
422 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
423 },
Craig Citroe633be12015-03-02 13:40:36 -0800424 }</pre>
425</div>
426
427</body></html>