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

For a list of methods for this resource, see the end of this page.

Resource representations

A Cloud SQL instance resource.

{
  "kind": "sql#instance",
  "instance": string,
  "etag": etag,
  "project": string,
  "state": string,
  "databaseVersion": string,
  "region": string,
  "currentDiskSize": long,
  "maxDiskSize": long,
  "settings": {
    "kind": "sql#settings",
    "authorizedGaeApplications": [
      string
    ],
    "tier": string,
    "backupConfiguration": [
      {
        "kind": "sql#backupConfiguration",
        "startTime": string,
        "enabled": boolean,
        "id": string
      }
    ],
    "pricingPlan": string,
    "replicationType": string,
    "activationPolicy": string
  }
}
Property name Value Description Notes
currentDiskSize long The current disk usage of the instance in bytes.
databaseVersion string The database engine type and version, for example MYSQL_5_5 for MySQL 5.5.
etag etag Etag for this resource - a version number for the settings object in this resource. This field has no effect when passed as a request parameter. Instead, the contents of this field should be passed in an 'If-Match' http header for use in optimistic locking.
instance string Name of the Cloud SQL instance. This does not include the project ID.
kind string This is always sql#instance .
maxDiskSize long The maximum disk size of the instance in bytes.
project string The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
region string The geographical region. Can be us-central or europe-west1 . Defaults to us-central . In the United States, instances are run in the us-central region to provide lower latencies from both Google Compute Engine and Google App Engine. The region can not be changed after instance creation. Note that a value of us-east1 is valid, but deprecated. These instances will be located in us-central . writable
settings nested object The user settings.
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 AppEngine app ids that can access this instance. writable
settings. backupConfiguration[] list The daily backup configuration for the instance. writable
settings.backupConfiguration[]. enabled boolean Whether this configuration is enabled. writable
settings.backupConfiguration[]. id string Identifier for this configuration. This gets generated automatically when a backup configuration is created.
settings.backupConfiguration[]. kind string This is always sql#backupConfiguration .
settings.backupConfiguration[]. startTime string Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM . writable
settings. kind string This is always sql#settings .
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
settings. tier string The tier of service for this instance, for example D1 , D2 . For more information, see pricing . writable
state string The current serving state of the Cloud SQL instance. This can be one of the following.
RUNNABLE : The instance is running, or is ready to run when accessed.
SUSPENDED : The instance is not available, for example due to problems with billing.
PENDING_CREATE : The instance is being created.
MAINTENANCE : The instance is down for maintenance.
UNKNOWN_STATE : The state of the instance is unknown.




Methods

delete
Deletes a Cloud SQL instance.
export
Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
get
Retrieves a resource containing information about a Cloud SQL instance.
import
Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
insert
Creates a new Cloud SQL instance.
list
Lists instances under a given project in the alphabetical order of the instance name.
patch
Updates settings of a Cloud SQL instance. This method supports patch semantics.
restart
Restarts a Cloud SQL instance.
restoreBackup
Restores a backup of a Cloud SQL instance.
update
Updates settings of a Cloud SQL instance.

Authentication required

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

Signing you in...

Google Developers needs your permission to do that.