blob: 9af2d39d4e0588525239f9e68236228f1cc27c06 [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.databases.html">databases</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">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#delete">delete(project, instance, database, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070082<p class="firstline">Deletes a database from a Cloud SQL instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -080083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#get">get(project, instance, database, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Retrieves a resource containing information about a database inside a Cloud SQL instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -080086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Inserts a resource containing information about a database inside a Cloud SQL instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -080089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080091<p class="firstline">Lists databases in the specified Cloud SQL instance.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#patch">patch(project, instance, database, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.</p>
Craig Citroe633be12015-03-02 13:40:36 -080095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#update">update(project, instance, database, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Updates a resource containing information about a database inside a Cloud SQL instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -080098<h3>Method Details</h3>
99<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code class="details" id="delete">delete(project, instance, database, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700106 <pre>Deletes a database from a Cloud SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800107
108Args:
109 project: string, Project ID of the project that contains the instance. (required)
110 instance: string, Database instance ID. This does not include the project ID. (required)
111 database: string, Name of the database to be deleted in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 x__xgafv: string, V1 error format.
113 Allowed values
114 1 - v1 error format
115 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800116
117Returns:
118 An object of the form:
119
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800120 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
121 &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*.
122 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
123 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
124 { # Database instance operation error.
125 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
126 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
127 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
128 },
129 ],
130 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
131 },
132 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
133 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800135 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800136 &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.
137 &quot;A String&quot;,
138 ],
139 &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.
140 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
141 &quot;offload&quot;: True or False, # Option for export offload.
142 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
143 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
144 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800145 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800146 &quot;schemaOnly&quot;: True or False, # Export only schemas.
147 &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 -0800148 &quot;A String&quot;,
149 ],
150 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800151 &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.
152 },
153 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
154 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
155 &quot;encryptionOptions&quot;: {
156 &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.
157 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
158 &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 -0800159 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800160 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800161 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
162 &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.
163 &quot;A String&quot;,
164 ],
165 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
166 },
167 &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.
168 &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.
169 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
170 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
171 &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.
172 },
173 &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*.
174 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
175 &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.
176 &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*
177 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
178 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
179 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
180 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
181 &quot;targetLink&quot;: &quot;A String&quot;,
182 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
183 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
184}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800185</div>
186
187<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 <code class="details" id="get">get(project, instance, database, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700189 <pre>Retrieves a resource containing information about a database inside a Cloud SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800190
191Args:
192 project: string, Project ID of the project that contains the instance. (required)
193 instance: string, Database instance ID. This does not include the project ID. (required)
194 database: string, Name of the database in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 x__xgafv: string, V1 error format.
196 Allowed values
197 1 - v1 error format
198 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800199
200Returns:
201 An object of the form:
202
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700203 { # Represents a SQL database on the Cloud SQL instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800204 &quot;charset&quot;: &quot;A String&quot;, # The Cloud SQL charset value.
205 &quot;collation&quot;: &quot;A String&quot;, # The Cloud SQL collation value.
206 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
207 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
208 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#database*.
209 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
210 &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.
211 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
212 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
213 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
214 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
215 },
216}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800217</div>
218
219<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700220 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700221 <pre>Inserts a resource containing information about a database inside a Cloud SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800222
223Args:
224 project: string, Project ID of the project that contains the instance. (required)
225 instance: string, Database instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800227 The object takes the form of:
228
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229{ # Represents a SQL database on the Cloud SQL instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800230 &quot;charset&quot;: &quot;A String&quot;, # The Cloud SQL charset value.
231 &quot;collation&quot;: &quot;A String&quot;, # The Cloud SQL collation value.
232 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
233 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
234 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#database*.
235 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
236 &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.
237 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
238 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
239 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
240 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
241 },
242}
Craig Citroe633be12015-03-02 13:40:36 -0800243
Dan O'Mearadd494642020-05-01 07:42:23 -0700244 x__xgafv: string, V1 error format.
245 Allowed values
246 1 - v1 error format
247 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800248
249Returns:
250 An object of the form:
251
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800252 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
253 &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*.
254 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
255 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
256 { # Database instance operation error.
257 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
258 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
259 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
260 },
261 ],
262 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
263 },
264 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
265 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
266 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800267 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800268 &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.
269 &quot;A String&quot;,
270 ],
271 &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.
272 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
273 &quot;offload&quot;: True or False, # Option for export offload.
274 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
275 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
276 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800277 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800278 &quot;schemaOnly&quot;: True or False, # Export only schemas.
279 &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 -0800280 &quot;A String&quot;,
281 ],
282 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800283 &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.
284 },
285 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
286 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
287 &quot;encryptionOptions&quot;: {
288 &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.
289 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
290 &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 -0800291 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800292 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800293 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
294 &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.
295 &quot;A String&quot;,
296 ],
297 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
298 },
299 &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.
300 &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.
301 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
302 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
303 &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.
304 },
305 &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*.
306 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
307 &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.
308 &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*
309 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
310 &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*.
311 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
312 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
313 &quot;targetLink&quot;: &quot;A String&quot;,
314 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
315 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
316}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800317</div>
318
319<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800321 <pre>Lists databases in the specified Cloud SQL instance.
322
323Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 project: string, Project ID of the project that contains the instance. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800325 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700326 x__xgafv: string, V1 error format.
327 Allowed values
328 1 - v1 error format
329 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800330
331Returns:
332 An object of the form:
333
334 { # Database list response.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800335 &quot;items&quot;: [ # List of database resources in the instance.
336 { # Represents a SQL database on the Cloud SQL instance.
337 &quot;charset&quot;: &quot;A String&quot;, # The Cloud SQL charset value.
338 &quot;collation&quot;: &quot;A String&quot;, # The Cloud SQL collation value.
339 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
340 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
341 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#database*.
342 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
343 &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.
344 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
345 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
346 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
347 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
348 },
349 },
350 ],
351 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#databasesList*.
352}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800353</div>
354
355<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 <code class="details" id="patch">patch(project, instance, database, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700357 <pre>Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.
Craig Citroe633be12015-03-02 13:40:36 -0800358
359Args:
360 project: string, Project ID of the project that contains the instance. (required)
361 instance: string, Database instance ID. This does not include the project ID. (required)
362 database: string, Name of the database to be updated in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800364 The object takes the form of:
365
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366{ # Represents a SQL database on the Cloud SQL instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800367 &quot;charset&quot;: &quot;A String&quot;, # The Cloud SQL charset value.
368 &quot;collation&quot;: &quot;A String&quot;, # The Cloud SQL collation value.
369 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
370 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
371 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#database*.
372 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
373 &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.
374 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
375 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
376 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
377 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
378 },
379}
Craig Citroe633be12015-03-02 13:40:36 -0800380
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 x__xgafv: string, V1 error format.
382 Allowed values
383 1 - v1 error format
384 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800385
386Returns:
387 An object of the form:
388
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800389 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
390 &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*.
391 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
392 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
393 { # Database instance operation error.
394 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
395 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
396 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
397 },
398 ],
399 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
400 },
401 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
402 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
403 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800404 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800405 &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.
406 &quot;A String&quot;,
407 ],
408 &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.
409 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
410 &quot;offload&quot;: True or False, # Option for export offload.
411 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
412 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
413 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800414 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800415 &quot;schemaOnly&quot;: True or False, # Export only schemas.
416 &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 -0800417 &quot;A String&quot;,
418 ],
419 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800420 &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.
421 },
422 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
423 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
424 &quot;encryptionOptions&quot;: {
425 &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.
426 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
427 &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 -0800428 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800429 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800430 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
431 &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.
432 &quot;A String&quot;,
433 ],
434 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
435 },
436 &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.
437 &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.
438 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
439 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
440 &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.
441 },
442 &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*.
443 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
444 &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.
445 &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*
446 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
447 &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*.
448 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
449 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
450 &quot;targetLink&quot;: &quot;A String&quot;,
451 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
452 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
453}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800454</div>
455
456<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 <code class="details" id="update">update(project, instance, database, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700458 <pre>Updates a resource containing information about a database inside a Cloud SQL instance.
Craig Citroe633be12015-03-02 13:40:36 -0800459
460Args:
461 project: string, Project ID of the project that contains the instance. (required)
462 instance: string, Database instance ID. This does not include the project ID. (required)
463 database: string, Name of the database to be updated in the instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700464 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800465 The object takes the form of:
466
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700467{ # Represents a SQL database on the Cloud SQL instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800468 &quot;charset&quot;: &quot;A String&quot;, # The Cloud SQL charset value.
469 &quot;collation&quot;: &quot;A String&quot;, # The Cloud SQL collation value.
470 &quot;etag&quot;: &quot;A String&quot;, # This field is deprecated and will be removed from a future version of the API.
471 &quot;instance&quot;: &quot;A String&quot;, # The name of the Cloud SQL instance. This does not include the project ID.
472 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#database*.
473 &quot;name&quot;: &quot;A String&quot;, # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
474 &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.
475 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
476 &quot;sqlserverDatabaseDetails&quot;: { # Represents a Sql Server database on the Cloud SQL instance.
477 &quot;compatibilityLevel&quot;: 42, # The version of SQL Server with which the database is to be made compatible
478 &quot;recoveryModel&quot;: &quot;A String&quot;, # The recovery model of a SQL Server database
479 },
480}
Craig Citroe633be12015-03-02 13:40:36 -0800481
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 x__xgafv: string, V1 error format.
483 Allowed values
484 1 - v1 error format
485 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800486
487Returns:
488 An object of the form:
489
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800490 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
491 &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*.
492 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
493 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
494 { # Database instance operation error.
495 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
496 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
497 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
498 },
499 ],
500 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
501 },
502 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
503 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
504 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800505 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800506 &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.
507 &quot;A String&quot;,
508 ],
509 &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.
510 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
511 &quot;offload&quot;: True or False, # Option for export offload.
512 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
513 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
514 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800515 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800516 &quot;schemaOnly&quot;: True or False, # Export only schemas.
517 &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 -0800518 &quot;A String&quot;,
519 ],
520 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800521 &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.
522 },
523 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
524 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
525 &quot;encryptionOptions&quot;: {
526 &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.
527 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
528 &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 -0800529 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800530 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800531 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
532 &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.
533 &quot;A String&quot;,
534 ],
535 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
536 },
537 &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.
538 &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.
539 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
540 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
541 &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.
542 },
543 &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*.
544 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
545 &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.
546 &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*
547 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
548 &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*.
549 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
550 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
551 &quot;targetLink&quot;: &quot;A String&quot;,
552 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
553 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
554}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800555</div>
556
557</body></html>