blob: 90bcb6eb286f702d71c2f837cd81447cfcecf0a8 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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_v1beta3.html">Cloud SQL Administration API</a> . <a href="sqladmin_v1beta3.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#clone">clone(project, body)</a></code></p>
79<p class="firstline">Creates a Cloud SQL instance as a clone of the source instance.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(project, instance)</a></code></p>
82<p class="firstline">Deletes a Cloud SQL instance.</p>
83<p class="toc_element">
84 <code><a href="#export">export(project, instance, body)</a></code></p>
85<p class="firstline">Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, instance)</a></code></p>
88<p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p>
89<p class="toc_element">
90 <code><a href="#import_">import_(project, instance, body)</a></code></p>
91<p class="firstline">Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.</p>
92<p class="toc_element">
93 <code><a href="#insert">insert(project, body)</a></code></p>
94<p class="firstline">Creates a new Cloud SQL instance.</p>
95<p class="toc_element">
96 <code><a href="#list">list(project, pageToken=None, maxResults=None)</a></code></p>
97<p class="firstline">Lists instances under a given project in the alphabetical order of the instance name.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#patch">patch(project, instance, body)</a></code></p>
103<p class="firstline">Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.. This method supports patch semantics.</p>
104<p class="toc_element">
105 <code><a href="#resetSslConfig">resetSslConfig(project, instance)</a></code></p>
106<p class="firstline">Deletes all client certificates and generates a new server SSL certificate for the instance. The changes will not take effect until the instance is restarted. Existing instances without a server certificate will need to call this once to set a server certificate.</p>
107<p class="toc_element">
108 <code><a href="#restart">restart(project, instance)</a></code></p>
109<p class="firstline">Restarts a Cloud SQL instance.</p>
110<p class="toc_element">
111 <code><a href="#restoreBackup">restoreBackup(project, instance, backupConfiguration, dueTime)</a></code></p>
112<p class="firstline">Restores a backup of a Cloud SQL instance.</p>
113<p class="toc_element">
114 <code><a href="#setRootPassword">setRootPassword(project, instance, body)</a></code></p>
115<p class="firstline">Sets the password for the root user.</p>
116<p class="toc_element">
117 <code><a href="#update">update(project, instance, body)</a></code></p>
118<p class="firstline">Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.</p>
119<h3>Method Details</h3>
120<div class="method">
121 <code class="details" id="clone">clone(project, body)</code>
122 <pre>Creates a Cloud SQL instance as a clone of the source instance.
123
124Args:
125 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
126 body: object, The request body. (required)
127 The object takes the form of:
128
129{ # Database instance clone request.
130 "cloneContext": { # Database instance clone context. # Contains details about the clone operation.
131 "sourceInstanceName": "A String", # Name of the Cloud SQL instance to be cloned.
132 "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, indentify the the position up to which the source instance should be cloned. If not specified, the source instance is cloned up to the most recent binary log coordintes.
133 "binLogPosition": "A String", # Position (offset) within the binary log file.
134 "kind": "sql#binLogCoordinates", # This is always sql#binLogCoordinates.
135 "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance.
136 },
137 "kind": "sql#cloneContext", # This is always sql#cloneContext.
138 "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone.
139 },
140 }
141
142
143Returns:
144 An object of the form:
145
146 { # Database instance clone response.
147 "kind": "sql#instancesClone", # This is always sql#instancesClone.
148 "operation": "A String", # An unique identifier for the operation associated with the cloned instance. You can use this identifier to retrieve the Operations resource, which has information about the operation.
149 }</pre>
150</div>
151
152<div class="method">
153 <code class="details" id="delete">delete(project, instance)</code>
154 <pre>Deletes a Cloud SQL instance.
155
156Args:
157 project: string, Project ID of the project that contains the instance to be deleted. (required)
158 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
159
160Returns:
161 An object of the form:
162
163 { # Database instance delete response.
164 "kind": "sql#instancesDelete", # This is always sql#instancesDelete.
165 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
166 }</pre>
167</div>
168
169<div class="method">
170 <code class="details" id="export">export(project, instance, body)</code>
171 <pre>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
172
173Args:
174 project: string, Project ID of the project that contains the instance to be exported. (required)
175 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
176 body: object, The request body. (required)
177 The object takes the form of:
178
179{ # Database instance export request.
180 "exportContext": { # Database instance export context. # Contains details about the export operation.
181 "table": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
182 "A String",
183 ],
184 "kind": "sql#exportContext", # This is always sql#exportContext.
185 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored, or where it was already stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If the filename ends with .gz, the contents are compressed.
186 "database": [ # Databases (for example, guestbook) from which the export is made. If unspecified, all databases are exported.
187 "A String",
188 ],
189 },
190 }
191
192
193Returns:
194 An object of the form:
195
196 { # Database instance export response.
197 "kind": "sql#instancesExport", # This is always sql#instancesExport.
198 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
199 }</pre>
200</div>
201
202<div class="method">
203 <code class="details" id="get">get(project, instance)</code>
204 <pre>Retrieves a resource containing information about a Cloud SQL instance.
205
206Args:
207 project: string, Project ID of the project that contains the instance. (required)
208 instance: string, Database instance ID. This does not include the project ID. (required)
209
210Returns:
211 An object of the form:
212
213 { # A Cloud SQL instance resource.
214 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
215 "kind": "sql#instance", # This is always sql#instance.
216 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
217 "serverCaCert": { # SslCerts Resource # SSL configuration.
218 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
219 "kind": "sql#sslCert", # This is always sql#sslCert.
220 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
221 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
222 "instance": "A String", # Name of the database instance.
223 "cert": "A String", # PEM representation.
224 "expirationTime": "A String", # Time when the certificate expires.
225 "createTime": "A String", # Time when the certificate was created.
226 },
227 "region": "A String", # The geographical region. Can be us-east1, us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
228 "settings": { # Database instance settings. # The user settings.
229 "databaseFlags": [ # The database flags passed to the instance at startup.
230 { # MySQL flags for Cloud SQL instances.
231 "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS.) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported. log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off wait_timeout 1..31536000
232 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
233 },
234 ],
235 "kind": "sql#settings", # This is always sql#settings.
236 "authorizedGaeApplications": [ # The AppEngine app ids that can access this instance.
237 "A String",
238 ],
239 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
240 # ALWAYS: The instance should always be active.
241 # NEVER: The instance should never be activated.
242 # ON_DEMAND: The instance is activated upon receiving requests.
243 "backupConfiguration": [ # The daily backup configuration for the instance.
244 { # Database instance backup configuration.
245 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
246 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
247 "enabled": True or False, # Whether this configuration is enabled.
248 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
249 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
250 },
251 ],
252 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
253 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
254 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
255 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
256 "A String",
257 ],
258 },
259 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
260 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
261 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
262 "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
263 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an AppEngine app or GCE zone for better perfomance.
264 "kind": "sql#locationPreference", # This is always sql#locationPreference.
265 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
266 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
267 },
268 },
269 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
270 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
271 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
272 # RUNNABLE: The instance is running, or is ready to run when accessed.
273 # SUSPENDED: The instance is not available, for example due to problems with billing.
274 # PENDING_CREATE: The instance is being created.
275 # MAINTENANCE: The instance is down for maintenance.
276 # UNKNOWN_STATE: The state of the instance is unknown.
277 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
278 "ipAddresses": [ # The assigned IP addresses for the instance.
279 { # Database instance IP Mapping.
280 "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
281 "ipAddress": "A String", # The IP address assigned.
282 },
283 ],
Craig Citro065b5302014-08-14 00:47:23 -0700284 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
John Asmuth614db982014-04-24 15:46:26 -0400285 }</pre>
286</div>
287
288<div class="method">
289 <code class="details" id="import_">import_(project, instance, body)</code>
290 <pre>Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
291
292Args:
293 project: string, Project ID of the project that contains the instance. (required)
294 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
295 body: object, The request body. (required)
296 The object takes the form of:
297
298{ # Database instance import request.
299 "importContext": { # Database instance import context. # Contains details about the import operation.
300 "kind": "sql#importContext", # This is always sql#importContext.
301 "uri": [ # A path to the MySQL dump file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported.
302 "A String",
303 ],
304 "database": "A String", # The database (for example, guestbook) to which the import is made. If not set, it is assumed that the database is specified in the file to be imported.
305 },
306 }
307
308
309Returns:
310 An object of the form:
311
312 { # Database instance import response.
313 "kind": "sql#instancesImport", # This is always sql#instancesImport.
314 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
315 }</pre>
316</div>
317
318<div class="method">
319 <code class="details" id="insert">insert(project, body)</code>
320 <pre>Creates a new Cloud SQL instance.
321
322Args:
323 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
324 body: object, The request body. (required)
325 The object takes the form of:
326
327{ # A Cloud SQL instance resource.
328 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
329 "kind": "sql#instance", # This is always sql#instance.
330 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
331 "serverCaCert": { # SslCerts Resource # SSL configuration.
332 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
333 "kind": "sql#sslCert", # This is always sql#sslCert.
334 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
335 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
336 "instance": "A String", # Name of the database instance.
337 "cert": "A String", # PEM representation.
338 "expirationTime": "A String", # Time when the certificate expires.
339 "createTime": "A String", # Time when the certificate was created.
340 },
341 "region": "A String", # The geographical region. Can be us-east1, us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
342 "settings": { # Database instance settings. # The user settings.
343 "databaseFlags": [ # The database flags passed to the instance at startup.
344 { # MySQL flags for Cloud SQL instances.
345 "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS.) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported. log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off wait_timeout 1..31536000
346 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
347 },
348 ],
349 "kind": "sql#settings", # This is always sql#settings.
350 "authorizedGaeApplications": [ # The AppEngine app ids that can access this instance.
351 "A String",
352 ],
353 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
354 # ALWAYS: The instance should always be active.
355 # NEVER: The instance should never be activated.
356 # ON_DEMAND: The instance is activated upon receiving requests.
357 "backupConfiguration": [ # The daily backup configuration for the instance.
358 { # Database instance backup configuration.
359 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
360 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
361 "enabled": True or False, # Whether this configuration is enabled.
362 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
363 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
364 },
365 ],
366 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
367 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
368 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
369 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
370 "A String",
371 ],
372 },
373 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
374 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
375 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
376 "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
377 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an AppEngine app or GCE zone for better perfomance.
378 "kind": "sql#locationPreference", # This is always sql#locationPreference.
379 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
380 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
381 },
382 },
383 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
384 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
385 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
386 # RUNNABLE: The instance is running, or is ready to run when accessed.
387 # SUSPENDED: The instance is not available, for example due to problems with billing.
388 # PENDING_CREATE: The instance is being created.
389 # MAINTENANCE: The instance is down for maintenance.
390 # UNKNOWN_STATE: The state of the instance is unknown.
391 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
392 "ipAddresses": [ # The assigned IP addresses for the instance.
393 { # Database instance IP Mapping.
394 "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
395 "ipAddress": "A String", # The IP address assigned.
396 },
397 ],
Craig Citro065b5302014-08-14 00:47:23 -0700398 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
John Asmuth614db982014-04-24 15:46:26 -0400399 }
400
401
402Returns:
403 An object of the form:
404
405 { # Database instance insert response.
406 "kind": "sql#instancesInsert", # This is always sql#instancesInsert.
407 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
408 }</pre>
409</div>
410
411<div class="method">
412 <code class="details" id="list">list(project, pageToken=None, maxResults=None)</code>
413 <pre>Lists instances under a given project in the alphabetical order of the instance name.
414
415Args:
416 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
417 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
418 maxResults: integer, The maximum number of results to return per response.
419
420Returns:
421 An object of the form:
422
423 { # Database instances list response.
424 "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
425 "items": [ # List of database instance resources.
426 { # A Cloud SQL instance resource.
427 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
428 "kind": "sql#instance", # This is always sql#instance.
429 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
430 "serverCaCert": { # SslCerts Resource # SSL configuration.
431 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
432 "kind": "sql#sslCert", # This is always sql#sslCert.
433 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
434 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
435 "instance": "A String", # Name of the database instance.
436 "cert": "A String", # PEM representation.
437 "expirationTime": "A String", # Time when the certificate expires.
438 "createTime": "A String", # Time when the certificate was created.
439 },
440 "region": "A String", # The geographical region. Can be us-east1, us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
441 "settings": { # Database instance settings. # The user settings.
442 "databaseFlags": [ # The database flags passed to the instance at startup.
443 { # MySQL flags for Cloud SQL instances.
444 "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS.) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported. log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off wait_timeout 1..31536000
445 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
446 },
447 ],
448 "kind": "sql#settings", # This is always sql#settings.
449 "authorizedGaeApplications": [ # The AppEngine app ids that can access this instance.
450 "A String",
451 ],
452 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
453 # ALWAYS: The instance should always be active.
454 # NEVER: The instance should never be activated.
455 # ON_DEMAND: The instance is activated upon receiving requests.
456 "backupConfiguration": [ # The daily backup configuration for the instance.
457 { # Database instance backup configuration.
458 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
459 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
460 "enabled": True or False, # Whether this configuration is enabled.
461 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
462 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
463 },
464 ],
465 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
466 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
467 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
468 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
469 "A String",
470 ],
471 },
472 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
473 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
474 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
475 "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
476 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an AppEngine app or GCE zone for better perfomance.
477 "kind": "sql#locationPreference", # This is always sql#locationPreference.
478 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
479 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
480 },
481 },
482 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
483 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
484 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
485 # RUNNABLE: The instance is running, or is ready to run when accessed.
486 # SUSPENDED: The instance is not available, for example due to problems with billing.
487 # PENDING_CREATE: The instance is being created.
488 # MAINTENANCE: The instance is down for maintenance.
489 # UNKNOWN_STATE: The state of the instance is unknown.
490 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
491 "ipAddresses": [ # The assigned IP addresses for the instance.
492 { # Database instance IP Mapping.
493 "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
494 "ipAddress": "A String", # The IP address assigned.
495 },
496 ],
Craig Citro065b5302014-08-14 00:47:23 -0700497 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
John Asmuth614db982014-04-24 15:46:26 -0400498 },
499 ],
500 "kind": "sql#instancesList", # This is always sql#instancesList.
501 }</pre>
502</div>
503
504<div class="method">
505 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
506 <pre>Retrieves the next page of results.
507
508Args:
509 previous_request: The request for the previous page. (required)
510 previous_response: The response from the request for the previous page. (required)
511
512Returns:
513 A request object that you can call 'execute()' on to request the next
514 page. Returns None if there are no more items in the collection.
515 </pre>
516</div>
517
518<div class="method">
519 <code class="details" id="patch">patch(project, instance, body)</code>
520 <pre>Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.. This method supports patch semantics.
521
522Args:
523 project: string, Project ID of the project that contains the instance. (required)
524 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
525 body: object, The request body. (required)
526 The object takes the form of:
527
528{ # A Cloud SQL instance resource.
529 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
530 "kind": "sql#instance", # This is always sql#instance.
531 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
532 "serverCaCert": { # SslCerts Resource # SSL configuration.
533 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
534 "kind": "sql#sslCert", # This is always sql#sslCert.
535 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
536 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
537 "instance": "A String", # Name of the database instance.
538 "cert": "A String", # PEM representation.
539 "expirationTime": "A String", # Time when the certificate expires.
540 "createTime": "A String", # Time when the certificate was created.
541 },
542 "region": "A String", # The geographical region. Can be us-east1, us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
543 "settings": { # Database instance settings. # The user settings.
544 "databaseFlags": [ # The database flags passed to the instance at startup.
545 { # MySQL flags for Cloud SQL instances.
546 "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS.) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported. log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off wait_timeout 1..31536000
547 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
548 },
549 ],
550 "kind": "sql#settings", # This is always sql#settings.
551 "authorizedGaeApplications": [ # The AppEngine app ids that can access this instance.
552 "A String",
553 ],
554 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
555 # ALWAYS: The instance should always be active.
556 # NEVER: The instance should never be activated.
557 # ON_DEMAND: The instance is activated upon receiving requests.
558 "backupConfiguration": [ # The daily backup configuration for the instance.
559 { # Database instance backup configuration.
560 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
561 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
562 "enabled": True or False, # Whether this configuration is enabled.
563 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
564 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
565 },
566 ],
567 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
568 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
569 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
570 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
571 "A String",
572 ],
573 },
574 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
575 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
576 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
577 "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
578 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an AppEngine app or GCE zone for better perfomance.
579 "kind": "sql#locationPreference", # This is always sql#locationPreference.
580 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
581 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
582 },
583 },
584 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
585 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
586 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
587 # RUNNABLE: The instance is running, or is ready to run when accessed.
588 # SUSPENDED: The instance is not available, for example due to problems with billing.
589 # PENDING_CREATE: The instance is being created.
590 # MAINTENANCE: The instance is down for maintenance.
591 # UNKNOWN_STATE: The state of the instance is unknown.
592 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
593 "ipAddresses": [ # The assigned IP addresses for the instance.
594 { # Database instance IP Mapping.
595 "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
596 "ipAddress": "A String", # The IP address assigned.
597 },
598 ],
Craig Citro065b5302014-08-14 00:47:23 -0700599 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
John Asmuth614db982014-04-24 15:46:26 -0400600 }
601
602
603Returns:
604 An object of the form:
605
606 { # Database instance update response.
607 "kind": "sql#instancesUpdate", # This is always sql#instancesUpdate.
608 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve information about the operation.
609 }</pre>
610</div>
611
612<div class="method">
613 <code class="details" id="resetSslConfig">resetSslConfig(project, instance)</code>
614 <pre>Deletes all client certificates and generates a new server SSL certificate for the instance. The changes will not take effect until the instance is restarted. Existing instances without a server certificate will need to call this once to set a server certificate.
615
616Args:
617 project: string, Project ID of the project that contains the instance. (required)
618 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
619
620Returns:
621 An object of the form:
622
623 { # Database instance resetSslConfig response.
624 "kind": "sql#instancesResetSslConfig", # This is always sql#instancesResetSslConfig.
625 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. All ssl client certificates will be deleted and a new server certificate will be created. Does not take effect until the next instance restart.
626 }</pre>
627</div>
628
629<div class="method">
630 <code class="details" id="restart">restart(project, instance)</code>
631 <pre>Restarts a Cloud SQL instance.
632
633Args:
634 project: string, Project ID of the project that contains the instance to be restarted. (required)
635 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
636
637Returns:
638 An object of the form:
639
640 { # Database instance restart response.
641 "kind": "sql#instancesRestart", # This is always sql#instancesRestart.
642 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
643 }</pre>
644</div>
645
646<div class="method">
647 <code class="details" id="restoreBackup">restoreBackup(project, instance, backupConfiguration, dueTime)</code>
648 <pre>Restores a backup of a Cloud SQL instance.
649
650Args:
651 project: string, Project ID of the project that contains the instance. (required)
652 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
653 backupConfiguration: string, The identifier of the backup configuration. This gets generated automatically when a backup configuration is created. (required)
654 dueTime: string, The time when this run is due to start in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. (required)
655
656Returns:
657 An object of the form:
658
659 { # Database instance restore backup response.
660 "kind": "sql#instancesRestoreBackup", # This is always sql#instancesRestoreBackup.
661 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
662 }</pre>
663</div>
664
665<div class="method">
666 <code class="details" id="setRootPassword">setRootPassword(project, instance, body)</code>
667 <pre>Sets the password for the root user.
668
669Args:
670 project: string, Project ID of the project that contains the instance. (required)
671 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
672 body: object, The request body. (required)
673 The object takes the form of:
674
675{ # Database instance set root password request.
676 "setRootPasswordContext": { # Database instance set root password context. # Set Root Password Context.
677 "kind": "sql#setRootUserContext", # This is always sql#setRootUserContext.
678 "password": "A String", # The password for the root user.
679 },
680 }
681
682
683Returns:
684 An object of the form:
685
686 { # Database instance set root password response.
687 "kind": "sql#instancesSetRootPassword", # This is always sql#instancesSetRootPassword.
688 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
689 }</pre>
690</div>
691
692<div class="method">
693 <code class="details" id="update">update(project, instance, body)</code>
694 <pre>Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.
695
696Args:
697 project: string, Project ID of the project that contains the instance. (required)
698 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
699 body: object, The request body. (required)
700 The object takes the form of:
701
702{ # A Cloud SQL instance resource.
703 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
704 "kind": "sql#instance", # This is always sql#instance.
705 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
706 "serverCaCert": { # SslCerts Resource # SSL configuration.
707 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
708 "kind": "sql#sslCert", # This is always sql#sslCert.
709 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
710 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
711 "instance": "A String", # Name of the database instance.
712 "cert": "A String", # PEM representation.
713 "expirationTime": "A String", # Time when the certificate expires.
714 "createTime": "A String", # Time when the certificate was created.
715 },
716 "region": "A String", # The geographical region. Can be us-east1, us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
717 "settings": { # Database instance settings. # The user settings.
718 "databaseFlags": [ # The database flags passed to the instance at startup.
719 { # MySQL flags for Cloud SQL instances.
720 "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. Refer to the official MySQL documentation on server options and system variables for descriptions of what these flags do. Acceptable values are: event_scheduler on or off (Note: The event scheduler will only work reliably if the instance activationPolicy is set to ALWAYS.) general_log on or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators on or off log_output Can be either TABLE or NONE, FILE is not supported. log_queries_not_using_indexes on or off long_query_time 0..30000000 lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only on or off skip_show_database on or off slow_query_log on or off wait_timeout 1..31536000
721 "value": "A String", # The value of the flag. Booleans should be set using 1 for true, and 0 for false. This field must be omitted if the flag doesn't take a value.
722 },
723 ],
724 "kind": "sql#settings", # This is always sql#settings.
725 "authorizedGaeApplications": [ # The AppEngine app ids that can access this instance.
726 "A String",
727 ],
728 "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
729 # ALWAYS: The instance should always be active.
730 # NEVER: The instance should never be activated.
731 # ON_DEMAND: The instance is activated upon receiving requests.
732 "backupConfiguration": [ # The daily backup configuration for the instance.
733 { # Database instance backup configuration.
734 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
735 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
736 "enabled": True or False, # Whether this configuration is enabled.
737 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
738 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
739 },
740 ],
741 "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
742 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
743 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
744 "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
745 "A String",
746 ],
747 },
748 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
749 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
750 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
751 "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
752 "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an AppEngine app or GCE zone for better perfomance.
753 "kind": "sql#locationPreference", # This is always sql#locationPreference.
754 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
755 "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the Cloud SQL instance.
756 },
757 },
758 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
759 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
760 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
761 # RUNNABLE: The instance is running, or is ready to run when accessed.
762 # SUSPENDED: The instance is not available, for example due to problems with billing.
763 # PENDING_CREATE: The instance is being created.
764 # MAINTENANCE: The instance is down for maintenance.
765 # UNKNOWN_STATE: The state of the instance is unknown.
766 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
767 "ipAddresses": [ # The assigned IP addresses for the instance.
768 { # Database instance IP Mapping.
769 "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
770 "ipAddress": "A String", # The IP address assigned.
771 },
772 ],
Craig Citro065b5302014-08-14 00:47:23 -0700773 "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion can not be changed after instance creation.
John Asmuth614db982014-04-24 15:46:26 -0400774 }
775
776
777Returns:
778 An object of the form:
779
780 { # Database instance update response.
781 "kind": "sql#instancesUpdate", # This is always sql#instancesUpdate.
782 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve information about the operation.
783 }</pre>
784</div>
785
786</body></html>