blob: b69db8f6f6ae119fbabc96148e97b3b140c2b837 [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>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070079<p class="firstline">Creates a Cloud SQL instance as a clone of a source instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<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>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070088<p class="firstline">Retrieves information about a Cloud SQL instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#import_">import_(project, instance, body)</a></code></p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070091<p class="firstline">Imports data into a Cloud SQL instance from a MySQL dump file stored in a Google Cloud Storage bucket.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<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>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070097<p class="firstline">Lists instances for a given project, in alphabetical order by instance name.</p>
John Asmuth614db982014-04-24 15:46:26 -040098<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>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700103<p class="firstline">Updates the settings of a Cloud SQL instance. This method supports patch semantics.</p>
104<p class="toc_element">
105 <code><a href="#promoteReplica">promoteReplica(project, instance)</a></code></p>
106<p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400107<p class="toc_element">
108 <code><a href="#resetSslConfig">resetSslConfig(project, instance)</a></code></p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700109<p class="firstline">Deletes all client certificates and generates a new server SSL certificate for a Cloud SQL instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400110<p class="toc_element">
111 <code><a href="#restart">restart(project, instance)</a></code></p>
112<p class="firstline">Restarts a Cloud SQL instance.</p>
113<p class="toc_element">
114 <code><a href="#restoreBackup">restoreBackup(project, instance, backupConfiguration, dueTime)</a></code></p>
115<p class="firstline">Restores a backup of a Cloud SQL instance.</p>
116<p class="toc_element">
117 <code><a href="#setRootPassword">setRootPassword(project, instance, body)</a></code></p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700118<p class="firstline">Sets the password for the root user of the specified Cloud SQL instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
120 <code><a href="#update">update(project, instance, body)</a></code></p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700121<p class="firstline">Updates the settings of a Cloud SQL instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400122<h3>Method Details</h3>
123<div class="method">
124 <code class="details" id="clone">clone(project, body)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700125 <pre>Creates a Cloud SQL instance as a clone of a source instance.
John Asmuth614db982014-04-24 15:46:26 -0400126
127Args:
128 project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
129 body: object, The request body. (required)
130 The object takes the form of:
131
132{ # Database instance clone request.
133 "cloneContext": { # Database instance clone context. # Contains details about the clone operation.
134 "sourceInstanceName": "A String", # Name of the Cloud SQL instance to be cloned.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700135 "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, indentify 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 coordinates.
John Asmuth614db982014-04-24 15:46:26 -0400136 "binLogPosition": "A String", # Position (offset) within the binary log file.
137 "kind": "sql#binLogCoordinates", # This is always sql#binLogCoordinates.
138 "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance.
139 },
140 "kind": "sql#cloneContext", # This is always sql#cloneContext.
141 "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone.
142 },
143 }
144
145
146Returns:
147 An object of the form:
148
149 { # Database instance clone response.
150 "kind": "sql#instancesClone", # This is always sql#instancesClone.
151 "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.
152 }</pre>
153</div>
154
155<div class="method">
156 <code class="details" id="delete">delete(project, instance)</code>
157 <pre>Deletes a Cloud SQL instance.
158
159Args:
160 project: string, Project ID of the project that contains the instance to be deleted. (required)
161 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
162
163Returns:
164 An object of the form:
165
166 { # Database instance delete response.
167 "kind": "sql#instancesDelete", # This is always sql#instancesDelete.
168 "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.
169 }</pre>
170</div>
171
172<div class="method">
173 <code class="details" id="export">export(project, instance, body)</code>
174 <pre>Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
175
176Args:
177 project: string, Project ID of the project that contains the instance to be exported. (required)
178 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
179 body: object, The request body. (required)
180 The object takes the form of:
181
182{ # Database instance export request.
183 "exportContext": { # Database instance export context. # Contains details about the export operation.
184 "table": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
185 "A String",
186 ],
187 "kind": "sql#exportContext", # This is always sql#exportContext.
188 "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.
189 "database": [ # Databases (for example, guestbook) from which the export is made. If unspecified, all databases are exported.
190 "A String",
191 ],
192 },
193 }
194
195
196Returns:
197 An object of the form:
198
199 { # Database instance export response.
200 "kind": "sql#instancesExport", # This is always sql#instancesExport.
201 "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.
202 }</pre>
203</div>
204
205<div class="method">
206 <code class="details" id="get">get(project, instance)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700207 <pre>Retrieves information about a Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400208
209Args:
210 project: string, Project ID of the project that contains the instance. (required)
211 instance: string, Database instance ID. This does not include the project ID. (required)
212
213Returns:
214 An object of the form:
215
216 { # A Cloud SQL instance resource.
217 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
218 "kind": "sql#instance", # This is always sql#instance.
219 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
220 "serverCaCert": { # SslCerts Resource # SSL configuration.
221 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
222 "kind": "sql#sslCert", # This is always sql#sslCert.
223 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
224 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
225 "instance": "A String", # Name of the database instance.
226 "cert": "A String", # PEM representation.
227 "expirationTime": "A String", # Time when the certificate expires.
228 "createTime": "A String", # Time when the certificate was created.
229 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700230 "replicaNames": [ # The replicas of the instance.
231 "A String",
232 ],
John Asmuth614db982014-04-24 15:46:26 -0400233 "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.
234 "settings": { # Database instance settings. # The user settings.
235 "databaseFlags": [ # The database flags passed to the instance at startup.
236 { # MySQL flags for Cloud SQL instances.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700237 "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: character_set_server utf8 or utf8mb4 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. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
John Asmuth614db982014-04-24 15:46:26 -0400238 "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.
239 },
240 ],
241 "kind": "sql#settings", # This is always sql#settings.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700242 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
John Asmuth614db982014-04-24 15:46:26 -0400243 "A String",
244 ],
245 "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.
246 # ALWAYS: The instance should always be active.
247 # NEVER: The instance should never be activated.
248 # ON_DEMAND: The instance is activated upon receiving requests.
249 "backupConfiguration": [ # The daily backup configuration for the instance.
250 { # Database instance backup configuration.
251 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
252 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
253 "enabled": True or False, # Whether this configuration is enabled.
254 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
255 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
256 },
257 ],
258 "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.
259 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
260 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
261 "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).
262 "A String",
263 ],
264 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700265 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
John Asmuth614db982014-04-24 15:46:26 -0400266 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
267 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700268 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
John Asmuth614db982014-04-24 15:46:26 -0400269 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700270 "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 App Engine app or GCE zone for better performance.
John Asmuth614db982014-04-24 15:46:26 -0400271 "kind": "sql#locationPreference", # This is always sql#locationPreference.
272 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700273 "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400274 },
275 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700276 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
John Asmuth614db982014-04-24 15:46:26 -0400277 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
278 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
279 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
280 # RUNNABLE: The instance is running, or is ready to run when accessed.
281 # SUSPENDED: The instance is not available, for example due to problems with billing.
282 # PENDING_CREATE: The instance is being created.
283 # MAINTENANCE: The instance is down for maintenance.
284 # UNKNOWN_STATE: The state of the instance is unknown.
285 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
286 "ipAddresses": [ # The assigned IP addresses for the instance.
287 { # Database instance IP Mapping.
288 "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.
289 "ipAddress": "A String", # The IP address assigned.
290 },
291 ],
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700292 "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 cannot be changed after instance creation.
293 "instanceType": "A String", # The instance type. This can be one of the following.
294 # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
295 # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
John Asmuth614db982014-04-24 15:46:26 -0400296 }</pre>
297</div>
298
299<div class="method">
300 <code class="details" id="import_">import_(project, instance, body)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700301 <pre>Imports data into a Cloud SQL instance from a MySQL dump file stored in a Google Cloud Storage bucket.
John Asmuth614db982014-04-24 15:46:26 -0400302
303Args:
304 project: string, Project ID of the project that contains the instance. (required)
305 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
306 body: object, The request body. (required)
307 The object takes the form of:
308
309{ # Database instance import request.
310 "importContext": { # Database instance import context. # Contains details about the import operation.
311 "kind": "sql#importContext", # This is always sql#importContext.
312 "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.
313 "A String",
314 ],
315 "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.
316 },
317 }
318
319
320Returns:
321 An object of the form:
322
323 { # Database instance import response.
324 "kind": "sql#instancesImport", # This is always sql#instancesImport.
325 "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.
326 }</pre>
327</div>
328
329<div class="method">
330 <code class="details" id="insert">insert(project, body)</code>
331 <pre>Creates a new Cloud SQL instance.
332
333Args:
334 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
335 body: object, The request body. (required)
336 The object takes the form of:
337
338{ # A Cloud SQL instance resource.
339 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
340 "kind": "sql#instance", # This is always sql#instance.
341 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
342 "serverCaCert": { # SslCerts Resource # SSL configuration.
343 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
344 "kind": "sql#sslCert", # This is always sql#sslCert.
345 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
346 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
347 "instance": "A String", # Name of the database instance.
348 "cert": "A String", # PEM representation.
349 "expirationTime": "A String", # Time when the certificate expires.
350 "createTime": "A String", # Time when the certificate was created.
351 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700352 "replicaNames": [ # The replicas of the instance.
353 "A String",
354 ],
John Asmuth614db982014-04-24 15:46:26 -0400355 "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.
356 "settings": { # Database instance settings. # The user settings.
357 "databaseFlags": [ # The database flags passed to the instance at startup.
358 { # MySQL flags for Cloud SQL instances.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700359 "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: character_set_server utf8 or utf8mb4 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. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
John Asmuth614db982014-04-24 15:46:26 -0400360 "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.
361 },
362 ],
363 "kind": "sql#settings", # This is always sql#settings.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700364 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
John Asmuth614db982014-04-24 15:46:26 -0400365 "A String",
366 ],
367 "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.
368 # ALWAYS: The instance should always be active.
369 # NEVER: The instance should never be activated.
370 # ON_DEMAND: The instance is activated upon receiving requests.
371 "backupConfiguration": [ # The daily backup configuration for the instance.
372 { # Database instance backup configuration.
373 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
374 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
375 "enabled": True or False, # Whether this configuration is enabled.
376 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
377 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
378 },
379 ],
380 "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.
381 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
382 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
383 "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).
384 "A String",
385 ],
386 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700387 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
John Asmuth614db982014-04-24 15:46:26 -0400388 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
389 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700390 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
John Asmuth614db982014-04-24 15:46:26 -0400391 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700392 "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 App Engine app or GCE zone for better performance.
John Asmuth614db982014-04-24 15:46:26 -0400393 "kind": "sql#locationPreference", # This is always sql#locationPreference.
394 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700395 "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400396 },
397 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700398 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
John Asmuth614db982014-04-24 15:46:26 -0400399 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
400 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
401 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
402 # RUNNABLE: The instance is running, or is ready to run when accessed.
403 # SUSPENDED: The instance is not available, for example due to problems with billing.
404 # PENDING_CREATE: The instance is being created.
405 # MAINTENANCE: The instance is down for maintenance.
406 # UNKNOWN_STATE: The state of the instance is unknown.
407 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
408 "ipAddresses": [ # The assigned IP addresses for the instance.
409 { # Database instance IP Mapping.
410 "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.
411 "ipAddress": "A String", # The IP address assigned.
412 },
413 ],
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700414 "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 cannot be changed after instance creation.
415 "instanceType": "A String", # The instance type. This can be one of the following.
416 # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
417 # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
John Asmuth614db982014-04-24 15:46:26 -0400418 }
419
420
421Returns:
422 An object of the form:
423
424 { # Database instance insert response.
425 "kind": "sql#instancesInsert", # This is always sql#instancesInsert.
426 "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.
427 }</pre>
428</div>
429
430<div class="method">
431 <code class="details" id="list">list(project, pageToken=None, maxResults=None)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700432 <pre>Lists instances for a given project, in alphabetical order by instance name.
John Asmuth614db982014-04-24 15:46:26 -0400433
434Args:
435 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
436 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
437 maxResults: integer, The maximum number of results to return per response.
438
439Returns:
440 An object of the form:
441
442 { # Database instances list response.
443 "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.
444 "items": [ # List of database instance resources.
445 { # A Cloud SQL instance resource.
446 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
447 "kind": "sql#instance", # This is always sql#instance.
448 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
449 "serverCaCert": { # SslCerts Resource # SSL configuration.
450 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
451 "kind": "sql#sslCert", # This is always sql#sslCert.
452 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
453 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
454 "instance": "A String", # Name of the database instance.
455 "cert": "A String", # PEM representation.
456 "expirationTime": "A String", # Time when the certificate expires.
457 "createTime": "A String", # Time when the certificate was created.
458 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700459 "replicaNames": [ # The replicas of the instance.
460 "A String",
461 ],
John Asmuth614db982014-04-24 15:46:26 -0400462 "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.
463 "settings": { # Database instance settings. # The user settings.
464 "databaseFlags": [ # The database flags passed to the instance at startup.
465 { # MySQL flags for Cloud SQL instances.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700466 "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: character_set_server utf8 or utf8mb4 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. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
John Asmuth614db982014-04-24 15:46:26 -0400467 "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.
468 },
469 ],
470 "kind": "sql#settings", # This is always sql#settings.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700471 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
John Asmuth614db982014-04-24 15:46:26 -0400472 "A String",
473 ],
474 "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.
475 # ALWAYS: The instance should always be active.
476 # NEVER: The instance should never be activated.
477 # ON_DEMAND: The instance is activated upon receiving requests.
478 "backupConfiguration": [ # The daily backup configuration for the instance.
479 { # Database instance backup configuration.
480 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
481 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
482 "enabled": True or False, # Whether this configuration is enabled.
483 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
484 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
485 },
486 ],
487 "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.
488 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
489 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
490 "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).
491 "A String",
492 ],
493 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700494 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
John Asmuth614db982014-04-24 15:46:26 -0400495 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
496 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700497 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
John Asmuth614db982014-04-24 15:46:26 -0400498 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700499 "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 App Engine app or GCE zone for better performance.
John Asmuth614db982014-04-24 15:46:26 -0400500 "kind": "sql#locationPreference", # This is always sql#locationPreference.
501 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700502 "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400503 },
504 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700505 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
John Asmuth614db982014-04-24 15:46:26 -0400506 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
507 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
508 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
509 # RUNNABLE: The instance is running, or is ready to run when accessed.
510 # SUSPENDED: The instance is not available, for example due to problems with billing.
511 # PENDING_CREATE: The instance is being created.
512 # MAINTENANCE: The instance is down for maintenance.
513 # UNKNOWN_STATE: The state of the instance is unknown.
514 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
515 "ipAddresses": [ # The assigned IP addresses for the instance.
516 { # Database instance IP Mapping.
517 "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.
518 "ipAddress": "A String", # The IP address assigned.
519 },
520 ],
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700521 "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 cannot be changed after instance creation.
522 "instanceType": "A String", # The instance type. This can be one of the following.
523 # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
524 # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
John Asmuth614db982014-04-24 15:46:26 -0400525 },
526 ],
527 "kind": "sql#instancesList", # This is always sql#instancesList.
528 }</pre>
529</div>
530
531<div class="method">
532 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
533 <pre>Retrieves the next page of results.
534
535Args:
536 previous_request: The request for the previous page. (required)
537 previous_response: The response from the request for the previous page. (required)
538
539Returns:
540 A request object that you can call 'execute()' on to request the next
541 page. Returns None if there are no more items in the collection.
542 </pre>
543</div>
544
545<div class="method">
546 <code class="details" id="patch">patch(project, instance, body)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700547 <pre>Updates the settings of a Cloud SQL instance. This method supports patch semantics.
John Asmuth614db982014-04-24 15:46:26 -0400548
549Args:
550 project: string, Project ID of the project that contains the instance. (required)
551 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
552 body: object, The request body. (required)
553 The object takes the form of:
554
555{ # A Cloud SQL instance resource.
556 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
557 "kind": "sql#instance", # This is always sql#instance.
558 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
559 "serverCaCert": { # SslCerts Resource # SSL configuration.
560 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
561 "kind": "sql#sslCert", # This is always sql#sslCert.
562 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
563 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
564 "instance": "A String", # Name of the database instance.
565 "cert": "A String", # PEM representation.
566 "expirationTime": "A String", # Time when the certificate expires.
567 "createTime": "A String", # Time when the certificate was created.
568 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700569 "replicaNames": [ # The replicas of the instance.
570 "A String",
571 ],
John Asmuth614db982014-04-24 15:46:26 -0400572 "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.
573 "settings": { # Database instance settings. # The user settings.
574 "databaseFlags": [ # The database flags passed to the instance at startup.
575 { # MySQL flags for Cloud SQL instances.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700576 "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: character_set_server utf8 or utf8mb4 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. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
John Asmuth614db982014-04-24 15:46:26 -0400577 "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.
578 },
579 ],
580 "kind": "sql#settings", # This is always sql#settings.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700581 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
John Asmuth614db982014-04-24 15:46:26 -0400582 "A String",
583 ],
584 "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.
585 # ALWAYS: The instance should always be active.
586 # NEVER: The instance should never be activated.
587 # ON_DEMAND: The instance is activated upon receiving requests.
588 "backupConfiguration": [ # The daily backup configuration for the instance.
589 { # Database instance backup configuration.
590 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
591 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
592 "enabled": True or False, # Whether this configuration is enabled.
593 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
594 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
595 },
596 ],
597 "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.
598 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
599 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
600 "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).
601 "A String",
602 ],
603 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700604 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
John Asmuth614db982014-04-24 15:46:26 -0400605 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
606 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700607 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
John Asmuth614db982014-04-24 15:46:26 -0400608 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700609 "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 App Engine app or GCE zone for better performance.
John Asmuth614db982014-04-24 15:46:26 -0400610 "kind": "sql#locationPreference", # This is always sql#locationPreference.
611 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700612 "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400613 },
614 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700615 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
John Asmuth614db982014-04-24 15:46:26 -0400616 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
617 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
618 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
619 # RUNNABLE: The instance is running, or is ready to run when accessed.
620 # SUSPENDED: The instance is not available, for example due to problems with billing.
621 # PENDING_CREATE: The instance is being created.
622 # MAINTENANCE: The instance is down for maintenance.
623 # UNKNOWN_STATE: The state of the instance is unknown.
624 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
625 "ipAddresses": [ # The assigned IP addresses for the instance.
626 { # Database instance IP Mapping.
627 "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.
628 "ipAddress": "A String", # The IP address assigned.
629 },
630 ],
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700631 "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 cannot be changed after instance creation.
632 "instanceType": "A String", # The instance type. This can be one of the following.
633 # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
634 # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
John Asmuth614db982014-04-24 15:46:26 -0400635 }
636
637
638Returns:
639 An object of the form:
640
641 { # Database instance update response.
642 "kind": "sql#instancesUpdate", # This is always sql#instancesUpdate.
643 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve information about the operation.
644 }</pre>
645</div>
646
647<div class="method">
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700648 <code class="details" id="promoteReplica">promoteReplica(project, instance)</code>
649 <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance.
650
651Args:
652 project: string, ID of the project that contains the read replica. (required)
653 instance: string, Cloud SQL read replica instance name. (required)
654
655Returns:
656 An object of the form:
657
658 { # Database promote read replica response.
659 "kind": "sql#instancesPromoteReplica", # This is always sql#instancesPromoteReplica.
660 "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.
661 }</pre>
662</div>
663
664<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400665 <code class="details" id="resetSslConfig">resetSslConfig(project, instance)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700666 <pre>Deletes all client certificates and generates a new server SSL certificate for a Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400667
668Args:
669 project: string, Project ID of the project that contains the instance. (required)
670 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
671
672Returns:
673 An object of the form:
674
675 { # Database instance resetSslConfig response.
676 "kind": "sql#instancesResetSslConfig", # This is always sql#instancesResetSslConfig.
677 "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.
678 }</pre>
679</div>
680
681<div class="method">
682 <code class="details" id="restart">restart(project, instance)</code>
683 <pre>Restarts a Cloud SQL instance.
684
685Args:
686 project: string, Project ID of the project that contains the instance to be restarted. (required)
687 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
688
689Returns:
690 An object of the form:
691
692 { # Database instance restart response.
693 "kind": "sql#instancesRestart", # This is always sql#instancesRestart.
694 "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.
695 }</pre>
696</div>
697
698<div class="method">
699 <code class="details" id="restoreBackup">restoreBackup(project, instance, backupConfiguration, dueTime)</code>
700 <pre>Restores a backup of a Cloud SQL instance.
701
702Args:
703 project: string, Project ID of the project that contains the instance. (required)
704 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
705 backupConfiguration: string, The identifier of the backup configuration. This gets generated automatically when a backup configuration is created. (required)
706 dueTime: string, The time when this run is due to start in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. (required)
707
708Returns:
709 An object of the form:
710
711 { # Database instance restore backup response.
712 "kind": "sql#instancesRestoreBackup", # This is always sql#instancesRestoreBackup.
713 "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.
714 }</pre>
715</div>
716
717<div class="method">
718 <code class="details" id="setRootPassword">setRootPassword(project, instance, body)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700719 <pre>Sets the password for the root user of the specified Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400720
721Args:
722 project: string, Project ID of the project that contains the instance. (required)
723 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
724 body: object, The request body. (required)
725 The object takes the form of:
726
727{ # Database instance set root password request.
728 "setRootPasswordContext": { # Database instance set root password context. # Set Root Password Context.
729 "kind": "sql#setRootUserContext", # This is always sql#setRootUserContext.
730 "password": "A String", # The password for the root user.
731 },
732 }
733
734
735Returns:
736 An object of the form:
737
738 { # Database instance set root password response.
739 "kind": "sql#instancesSetRootPassword", # This is always sql#instancesSetRootPassword.
740 "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.
741 }</pre>
742</div>
743
744<div class="method">
745 <code class="details" id="update">update(project, instance, body)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700746 <pre>Updates the settings of a Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400747
748Args:
749 project: string, Project ID of the project that contains the instance. (required)
750 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
751 body: object, The request body. (required)
752 The object takes the form of:
753
754{ # A Cloud SQL instance resource.
755 "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
756 "kind": "sql#instance", # This is always sql#instance.
757 "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
758 "serverCaCert": { # SslCerts Resource # SSL configuration.
759 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
760 "kind": "sql#sslCert", # This is always sql#sslCert.
761 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
762 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
763 "instance": "A String", # Name of the database instance.
764 "cert": "A String", # PEM representation.
765 "expirationTime": "A String", # Time when the certificate expires.
766 "createTime": "A String", # Time when the certificate was created.
767 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700768 "replicaNames": [ # The replicas of the instance.
769 "A String",
770 ],
John Asmuth614db982014-04-24 15:46:26 -0400771 "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.
772 "settings": { # Database instance settings. # The user settings.
773 "databaseFlags": [ # The database flags passed to the instance at startup.
774 { # MySQL flags for Cloud SQL instances.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700775 "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: character_set_server utf8 or utf8mb4 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. If set to on, you must also set the log_output flag to TABLE to receive logs. wait_timeout 1..31536000
John Asmuth614db982014-04-24 15:46:26 -0400776 "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.
777 },
778 ],
779 "kind": "sql#settings", # This is always sql#settings.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700780 "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
John Asmuth614db982014-04-24 15:46:26 -0400781 "A String",
782 ],
783 "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.
784 # ALWAYS: The instance should always be active.
785 # NEVER: The instance should never be activated.
786 # ON_DEMAND: The instance is activated upon receiving requests.
787 "backupConfiguration": [ # The daily backup configuration for the instance.
788 { # Database instance backup configuration.
789 "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
790 "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
791 "enabled": True or False, # Whether this configuration is enabled.
792 "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
793 "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
794 },
795 ],
796 "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.
797 "enabled": True or False, # Whether the instance should be assigned an IP address or not.
798 "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
799 "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).
800 "A String",
801 ],
802 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700803 "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
John Asmuth614db982014-04-24 15:46:26 -0400804 "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
805 "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700806 "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
John Asmuth614db982014-04-24 15:46:26 -0400807 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700808 "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 App Engine app or GCE zone for better performance.
John Asmuth614db982014-04-24 15:46:26 -0400809 "kind": "sql#locationPreference", # This is always sql#locationPreference.
810 "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700811 "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
John Asmuth614db982014-04-24 15:46:26 -0400812 },
813 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700814 "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
John Asmuth614db982014-04-24 15:46:26 -0400815 "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
816 "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
817 "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
818 # RUNNABLE: The instance is running, or is ready to run when accessed.
819 # SUSPENDED: The instance is not available, for example due to problems with billing.
820 # PENDING_CREATE: The instance is being created.
821 # MAINTENANCE: The instance is down for maintenance.
822 # UNKNOWN_STATE: The state of the instance is unknown.
823 "etag": "A String", # HTTP 1.1 Entity tag for the resource.
824 "ipAddresses": [ # The assigned IP addresses for the instance.
825 { # Database instance IP Mapping.
826 "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.
827 "ipAddress": "A String", # The IP address assigned.
828 },
829 ],
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700830 "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 cannot be changed after instance creation.
831 "instanceType": "A String", # The instance type. This can be one of the following.
832 # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
833 # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
John Asmuth614db982014-04-24 15:46:26 -0400834 }
835
836
837Returns:
838 An object of the form:
839
840 { # Database instance update response.
841 "kind": "sql#instancesUpdate", # This is always sql#instancesUpdate.
842 "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve information about the operation.
843 }</pre>
844</div>
845
846</body></html>