blob: 9dadc9b9525ea408883b35cc3c0171b8cf9e08b6 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.projects.html">projects</a> . <a href="sqladmin_v1beta4.projects.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#rescheduleMaintenance">rescheduleMaintenance(project, instance, body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Reschedules the maintenance on the given instance.</p>
83<p class="toc_element">
84 <code><a href="#startExternalSync">startExternalSync(project, instance, syncMode=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Start External primary instance migration.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070086<p class="toc_element">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070087 <code><a href="#verifyExternalSyncSettings">verifyExternalSyncSettings(project, instance, syncMode=None, verifyConnectionOnly=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Verify External primary instance external sync settings.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070089<h3>Method Details</h3>
90<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091 <code class="details" id="close">close()</code>
92 <pre>Close httplib2 connections.</pre>
93</div>
94
95<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code class="details" id="rescheduleMaintenance">rescheduleMaintenance(project, instance, body=None, x__xgafv=None)</code>
97 <pre>Reschedules the maintenance on the given instance.
98
99Args:
100 project: string, ID of the project that contains the instance. (required)
101 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
102 body: object, The request body.
103 The object takes the form of:
104
105{ # Reschedule options for maintenance windows.
106 &quot;reschedule&quot;: { # Required. The type of the reschedule the user wants.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700107 &quot;scheduleTime&quot;: &quot;A String&quot;, # Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700108 &quot;rescheduleType&quot;: &quot;A String&quot;, # Required. The type of the reschedule.
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 },
110 }
111
112 x__xgafv: string, V1 error format.
113 Allowed values
114 1 - v1 error format
115 2 - v2 error format
116
117Returns:
118 An object of the form:
119
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700120 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700122 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
124 &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.
125 &quot;A String&quot;,
126 ],
127 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
128 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700129 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
130 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
131 &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.
132 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700133 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
134 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700135 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700136 &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.
137 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 },
139 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700140 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700141 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
142 &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.
143 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
144 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
145 &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.
146 },
147 &quot;schemaOnly&quot;: True or False, # Export only schemas.
148 &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.
149 &quot;A String&quot;,
150 ],
151 },
152 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
153 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
154 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
155 },
156 &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.
157 &quot;offload&quot;: True or False, # Option for export offload.
158 &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.
159 &quot;A String&quot;,
160 ],
161 },
162 &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*.
163 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
164 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
165 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
166 &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*.
167 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
168 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
169 &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*
170 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
171 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
172 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
173 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
174 { # Database instance operation error.
175 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
176 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
177 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
178 },
179 ],
180 },
181 &quot;targetLink&quot;: &quot;A String&quot;,
182 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
183 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 }</pre>
185</div>
186
187<div class="method">
188 <code class="details" id="startExternalSync">startExternalSync(project, instance, syncMode=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700189 <pre>Start External primary instance migration.
Bu Sun Kim65020912020-05-20 12:08:20 -0700190
191Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700192 project: string, ID of the project that contains the instance. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
194 syncMode: string, External sync mode
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700195 Allowed values
196 EXTERNAL_SYNC_MODE_UNSPECIFIED - Unknown external sync mode, will be defaulted to ONLINE mode
197 ONLINE - Online external sync will set up replication after initial data external sync
198 OFFLINE - Offline external sync only dumps and loads a one-time snapshot of the primary instance&#x27;s data
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 x__xgafv: string, V1 error format.
200 Allowed values
201 1 - v1 error format
202 2 - v2 error format
203
204Returns:
205 An object of the form:
206
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700207 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700208 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700209 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700210 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
211 &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.
212 &quot;A String&quot;,
213 ],
214 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
215 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700216 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#importContext*.
217 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
218 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data.
219 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700220 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
221 &quot;encryptionOptions&quot;: {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700222 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700223 &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.
224 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700225 },
226 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700227 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700228 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
229 &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.
230 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
231 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
232 &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.
233 },
234 &quot;schemaOnly&quot;: True or False, # Export only schemas.
235 &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.
236 &quot;A String&quot;,
237 ],
238 },
239 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#exportContext*.
240 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV.
241 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
242 },
243 &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.
244 &quot;offload&quot;: True or False, # Option for export offload.
245 &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.
246 &quot;A String&quot;,
247 ],
248 },
249 &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*.
250 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
251 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
252 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED*
253 &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*.
254 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
255 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
256 &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*
257 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operation*.
258 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
259 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationErrors*.
260 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
261 { # Database instance operation error.
262 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
263 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
264 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#operationError*.
265 },
266 ],
267 },
268 &quot;targetLink&quot;: &quot;A String&quot;,
269 &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.
270 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 }</pre>
272</div>
273
274<div class="method">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700275 <code class="details" id="verifyExternalSyncSettings">verifyExternalSyncSettings(project, instance, syncMode=None, verifyConnectionOnly=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700276 <pre>Verify External primary instance external sync settings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700277
278Args:
279 project: string, Project ID of the project that contains the instance. (required)
280 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700281 syncMode: string, External sync mode
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700282 Allowed values
283 EXTERNAL_SYNC_MODE_UNSPECIFIED - Unknown external sync mode, will be defaulted to ONLINE mode
284 ONLINE - Online external sync will set up replication after initial data external sync
285 OFFLINE - Offline external sync only dumps and loads a one-time snapshot of the primary instance&#x27;s data
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700286 verifyConnectionOnly: boolean, Flag to enable verifying connection only
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 x__xgafv: string, V1 error format.
288 Allowed values
289 1 - v1 error format
290 2 - v2 error format
291
292Returns:
293 An object of the form:
294
295 { # Instance verify external sync settings response.
296 &quot;errors&quot;: [ # List of migration violations.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700297 { # External primary instance migration setting error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;detail&quot;: &quot;A String&quot;, # Additional information about the error encountered.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700299 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#migrationSettingError*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 &quot;type&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
301 },
302 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700303 &quot;kind&quot;: &quot;A String&quot;, # This is always *sql#migrationSettingErrorList*.
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 }</pre>
305</div>
306
307</body></html>