blob: f899697f61e9eecb70efdf33377ae6ee22e1c78c [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">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -080081 <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">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080090 <code><a href="#update">update(project, instance, body=None, host=None, name=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080091<p class="firstline">Updates an existing user in a Cloud SQL instance.</p>
92<h3>Method Details</h3>
93<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094 <code class="details" id="close">close()</code>
95 <pre>Close httplib2 connections.</pre>
96</div>
97
98<div class="method">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -080099 <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)
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800105 host: string, Host of the user in the instance.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800106 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
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700115 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800116 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
117 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700118 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800119 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700120 &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**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800121 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
122 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
123 { # Database instance operation error.
124 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
yoshi-code-bot312da312021-09-21 00:22:28 -0700125 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800126 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
127 },
128 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700129 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800130 },
131 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-bot312da312021-09-21 00:22:28 -0700132 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700133 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
134 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
135 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
136 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800137 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800138 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700139 &quot;databases&quot;: [ # Databases to be exported. * **MySQL instances:** If **fileType** is **SQL** and no database is specified, all databases are exported, except for the **mysql** system database. If **fileType** is **CSV**, you can specify one database, either by using this property or by using the **csvExportOptions.selectQuery** property, which takes precedence over this property. * **PostgreSQL instances:** You must specify one database to be exported. If **fileType** is **CSV**, this database must match the one specified in the **csvExportOptions.selectQuery** property. * **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800140 &quot;A String&quot;,
141 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700142 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800143 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
144 &quot;offload&quot;: True or False, # Option for export offload.
145 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
146 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-bot312da312021-09-21 00:22:28 -0700147 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800148 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800149 &quot;schemaOnly&quot;: True or False, # Export only schemas.
150 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800151 &quot;A String&quot;,
152 ],
153 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700154 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800155 },
156 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
157 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
158 &quot;encryptionOptions&quot;: {
yoshi-code-bot312da312021-09-21 00:22:28 -0700159 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800160 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
161 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800162 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800163 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800164 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
165 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
166 &quot;A String&quot;,
167 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700168 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
169 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
170 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
171 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800172 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
173 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700174 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If **fileType** is **SQL**, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If **fileType** is **CSV**, one database must be specified.
175 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. * **SQL**: The file contains SQL statements. * **CSV**: The file contains CSV data. * **BAK**: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800176 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
yoshi-code-bot312da312021-09-21 00:22:28 -0700177 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
178 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form **gs://bucketName/fileName**. Compressed gzip files (.gz) are supported when **fileType** is **SQL**. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800179 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700180 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
181 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800182 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
yoshi-code-bot312da312021-09-21 00:22:28 -0700183 &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**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800184 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot312da312021-09-21 00:22:28 -0700185 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
186 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: * **PENDING** * **RUNNING** * **DONE** * **SQL_OPERATION_STATUS_UNSPECIFIED**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800187 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
188 &quot;targetLink&quot;: &quot;A String&quot;,
189 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
190 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
191}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800192</div>
193
194<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800196 <pre>Creates a new user in a Cloud SQL instance.
197
198Args:
199 project: string, Project ID of the project that contains the instance. (required)
200 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800202 The object takes the form of:
203
204{ # A Cloud SQL user resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800205 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
206 &quot;host&quot;: &quot;A String&quot;, # The host name from which the user can connect. For *insert* operations, host defaults to an empty string. For *update* operations, host is specified as part of the request URL. The host name cannot be updated after insertion.
207 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for *update* since it is already specified on the URL.
208 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
209 &quot;name&quot;: &quot;A String&quot;, # The name of the user in the Cloud SQL instance. Can be omitted for *update* since it is already specified in the URL.
210 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
211 &quot;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.
212 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
213 &quot;disabled&quot;: True or False, # If the user has been disabled
214 &quot;serverRoles&quot;: [ # The server roles for this user
215 &quot;A String&quot;,
216 ],
217 },
218 &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.
219}
Craig Citroe633be12015-03-02 13:40:36 -0800220
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 x__xgafv: string, V1 error format.
222 Allowed values
223 1 - v1 error format
224 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800225
226Returns:
227 An object of the form:
228
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700229 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800230 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
231 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700232 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800233 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700234 &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**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800235 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
236 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
237 { # Database instance operation error.
238 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
yoshi-code-bot312da312021-09-21 00:22:28 -0700239 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800240 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
241 },
242 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700243 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 },
245 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-bot312da312021-09-21 00:22:28 -0700246 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700247 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
248 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
249 &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.
250 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800251 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800252 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700253 &quot;databases&quot;: [ # Databases to be exported. * **MySQL instances:** If **fileType** is **SQL** and no database is specified, all databases are exported, except for the **mysql** system database. If **fileType** is **CSV**, you can specify one database, either by using this property or by using the **csvExportOptions.selectQuery** property, which takes precedence over this property. * **PostgreSQL instances:** You must specify one database to be exported. If **fileType** is **CSV**, this database must match the one specified in the **csvExportOptions.selectQuery** property. * **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800254 &quot;A String&quot;,
255 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700256 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800257 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
258 &quot;offload&quot;: True or False, # Option for export offload.
259 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
260 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-bot312da312021-09-21 00:22:28 -0700261 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800262 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800263 &quot;schemaOnly&quot;: True or False, # Export only schemas.
264 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800265 &quot;A String&quot;,
266 ],
267 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700268 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800269 },
270 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
271 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
272 &quot;encryptionOptions&quot;: {
yoshi-code-bot312da312021-09-21 00:22:28 -0700273 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800274 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
275 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form *gs://bucketName/fileName*. The instance must have write permissions to the bucket and read access to the file.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800276 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800277 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800278 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
279 &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.
280 &quot;A String&quot;,
281 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700282 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
283 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
284 &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.
285 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800286 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
287 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700288 &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.
289 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800290 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
yoshi-code-bot312da312021-09-21 00:22:28 -0700291 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
292 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800293 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700294 &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**.
295 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800296 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
yoshi-code-bot312da312021-09-21 00:22:28 -0700297 &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**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800298 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot312da312021-09-21 00:22:28 -0700299 &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**.
300 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: * **PENDING** * **RUNNING** * **DONE** * **SQL_OPERATION_STATUS_UNSPECIFIED**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800301 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
302 &quot;targetLink&quot;: &quot;A String&quot;,
303 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
304 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
305}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800306</div>
307
308<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800310 <pre>Lists users in the specified Cloud SQL instance.
311
312Args:
313 project: string, Project ID of the project that contains the instance. (required)
314 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700315 x__xgafv: string, V1 error format.
316 Allowed values
317 1 - v1 error format
318 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800319
320Returns:
321 An object of the form:
322
323 { # User list response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800324 &quot;items&quot;: [ # List of user resources in the instance.
325 { # A Cloud SQL user resource.
326 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
327 &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.
328 &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.
329 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
330 &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.
331 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
332 &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.
333 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
334 &quot;disabled&quot;: True or False, # If the user has been disabled
335 &quot;serverRoles&quot;: [ # The server roles for this user
336 &quot;A String&quot;,
337 ],
338 },
339 &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.
340 },
341 ],
342 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#usersList*.
343 &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.
344}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800345</div>
346
347<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800348 <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 -0800349 <pre>Updates an existing user in a Cloud SQL instance.
350
351Args:
352 project: string, Project ID of the project that contains the instance. (required)
353 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800355 The object takes the form of:
356
357{ # A Cloud SQL user resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800358 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
359 &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.
360 &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.
361 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#user*.
362 &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.
363 &quot;password&quot;: &quot;A String&quot;, # The password for the user.
364 &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.
365 &quot;sqlserverUserDetails&quot;: { # Represents a Sql Server user on the Cloud SQL instance.
366 &quot;disabled&quot;: True or False, # If the user has been disabled
367 &quot;serverRoles&quot;: [ # The server roles for this user
368 &quot;A String&quot;,
369 ],
370 },
371 &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.
372}
Craig Citroe633be12015-03-02 13:40:36 -0800373
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800374 host: string, Optional. Host of the user in the instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800375 name: string, Name of the user in the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 x__xgafv: string, V1 error format.
377 Allowed values
378 1 - v1 error format
379 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800380
381Returns:
382 An object of the form:
383
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700384 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800385 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
386 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700387 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800388 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700389 &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**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800390 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
391 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
392 { # Database instance operation error.
393 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
yoshi-code-bot312da312021-09-21 00:22:28 -0700394 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800395 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
396 },
397 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700398 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800399 },
400 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-bot312da312021-09-21 00:22:28 -0700401 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700402 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
403 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
404 &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.
405 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800406 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800407 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700408 &quot;databases&quot;: [ # Databases to be exported. * **MySQL instances:** If **fileType** is **SQL** and no database is specified, all databases are exported, except for the **mysql** system database. If **fileType** is **CSV**, you can specify one database, either by using this property or by using the **csvExportOptions.selectQuery** property, which takes precedence over this property. * **PostgreSQL instances:** You must specify one database to be exported. If **fileType** is **CSV**, this database must match the one specified in the **csvExportOptions.selectQuery** property. * **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800409 &quot;A String&quot;,
410 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700411 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800412 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
413 &quot;offload&quot;: True or False, # Option for export offload.
414 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
415 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-bot312da312021-09-21 00:22:28 -0700416 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800417 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800418 &quot;schemaOnly&quot;: True or False, # Export only schemas.
419 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800420 &quot;A String&quot;,
421 ],
422 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700423 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800424 },
425 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
426 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
427 &quot;encryptionOptions&quot;: {
yoshi-code-bot312da312021-09-21 00:22:28 -0700428 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800429 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
430 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800431 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800432 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800433 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
434 &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.
435 &quot;A String&quot;,
436 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700437 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
438 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
439 &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.
440 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800441 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
442 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700443 &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.
444 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800445 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
yoshi-code-bot312da312021-09-21 00:22:28 -0700446 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
447 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800448 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700449 &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**.
450 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800451 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
yoshi-code-bot312da312021-09-21 00:22:28 -0700452 &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**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800453 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot312da312021-09-21 00:22:28 -0700454 &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**.
455 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: * **PENDING** * **RUNNING** * **DONE** * **SQL_OPERATION_STATUS_UNSPECIFIED**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800456 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
457 &quot;targetLink&quot;: &quot;A String&quot;,
458 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
459 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
460}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800461</div>
462
463</body></html>