Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Instances: update

Requires authorization

Updates the settings of a Cloud SQL instance. Try it now .

Request

HTTP request

PUT https://www.googleapis.com/sql/v1beta3/projects/project/instances/instance

Parameters

Parameter name Value Description
Path parameters
instance string Cloud SQL instance ID. This does not include the project ID.
project string Project ID of the project that contains the instance.

Authorization

This request requires authorization with the following scope ( read more about authentication and authorization ).

Scope
https://www.googleapis.com/auth/sqlservice.admin

Request body

In the request body, supply an instance resource with the following properties:

Property name Value Description Notes
Required Properties
instance string Name of the Cloud SQL instance. This does not include the project ID.
project string The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
settings. settingsVersion long 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.
settings. tier string The tier of service for this instance, for example D1 , D2 . For more information, see pricing . writable
Optional Properties
settings. activationPolicy 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.
ALWAYS : The instance should always be active.
NEVER : The instance should never be activated.
ON_DEMAND : The instance is activated upon receiving requests.


writable
settings. authorizedGaeApplications[] list The App Engine app IDs that can access this instance. writable
settings. backupConfiguration[] list The daily backup configuration for the instance. writable
settings.backupConfiguration[]. binaryLogEnabled boolean Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well. writable
settings.backupConfiguration[]. enabled boolean Whether this configuration is enabled. writable
settings.backupConfiguration[]. startTime string Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM . writable
settings. ipConfiguration nested object The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. writable
settings.ipConfiguration. authorizedNetworks[] list 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 ). writable
settings.ipConfiguration. enabled boolean Whether the instance should be assigned an IP address or not. writable
settings.ipConfiguration. requireSsl boolean Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP. writable
settings. locationPreference nested object 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. writable
settings.locationPreference. followGaeApplication string The App Engine application to follow, it must be in the same region as the Cloud SQL instance. writable
settings.locationPreference. zone string The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.). writable
settings. pricingPlan string The pricing plan for this instance. This can be either PER_USE or PACKAGE . writable
settings. replicationType string The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS . writable

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "sql#instancesUpdate",
  "operation": string
}
Property name Value Description Notes
kind string This is always sql#instancesUpdate .
operation string An identifier that uniquely identifies the operation. You can use this identifier to retrieve information about the operation.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.