Editing instances

This page describes how to edit an existing Cloud SQL instance.

After you create an instance, you can edit it while it's running to change its settings. For information about instance settings and how changing settings can impact an instance, see Instance Settings.

You can integrate Cloud SQL for SQL Server with Managed Service for Microsoft Active Directory (Managed Microsoft AD). Integration includes functionality for joining and leaving a Managed Microsoft AD domain at the per-instance level. For more information, see the Overview of Managed Microsoft AD in Cloud SQL.

Editing an instance

Most edits can be applied to an instance only when it's running.


  1. In the Google Cloud Console, go to the Cloud SQL Instances page.

    Go to Cloud SQL Instances

  2. Click the instance name to open its Overview page.
  3. Click Edit.
  4. In the Configuration options section, update settings for your instance:
    Setting Notes
    Machine type
    Machine typeSelect from Shared core, Lightweight, Standard (Most common), or High memory.
    Custom Select this button to create an instance with a flexible configuration. When you select this option, you need to select the number of cores and amount of memory for your instance. Learn more.
    Cores The number of vCPUs for your instance. Learn more.
    Memory The amount of memory for your instance, in GBs. Learn more.
    Storage type Determines whether your instance uses SSD or HDD storage. Learn more.
    Storage capacity The amount of storage provisioned for the instance. Learn more.
    Enable automatic storage increases Determines whether Cloud SQL automatically provides more storage for your instance when free space runs low. Learn more.
    Google-managed encryptionThe default option.
    Customer key-managed encryption key (CMEK)Select to use your key with Google Cloud Key Management Service. Learn more.
    Private IP Adds a private IP address for your instance. To enable connecting to the instance, additional configuration is required. Learn more.
    Public IP Adds a public IP address for your instance. You can then add authorized networks to connect to the instance. Learn more.
    Authorized networksAdd the name for the new network and the Network address. Learn more.
    Automate backups The window of time when you would like backups to start.
    Choose where to store your backupsSelect Multi-region for most use cases. If you need to store backups in a specific region, for example, if there are regulatory reasons to do so, select Region and select your region from the Location drop-down menu.
    Choose how many automated backups to storeThe number of automated backups you would like to retain (from 1 to 365 days). Learn more.
    Preferred window Determines a one-hour window when Cloud SQL can perform disruptive maintenance on your instance. If you do not set the window, then disruptive maintenance can be done at any time. Learn more.
    Order of updates Your preferred timing for instance updates, relative to other instances in the same project. Learn more.
    ADD FLAG You can use database flags to control settings and parameters for your instance. Learn more.
    ADD LABELAdd a key and value for each label that you add. You use labels to help organize your instances.

    Learn more about instance settings.

  5. Click Save to apply your changes.


The following command modifies the backup start time.

gcloud sql instances patch INSTANCE_NAME \
--backup-start-time 16:00

If the patch modifies a value that requires a restart, you will see a prompt to proceed with the change or cancel.

REST v1beta4

The following command modifies the backup start time.

Before using any of the request data below, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id

Request JSON body:

  "settings": {
    "backupConfiguration": {
      "startTime": "16:00",
      "enabled": true,
      "binaryLogEnabled": true

To send your request, expand one of these options:

You should receive a JSON response similar to the following:

  "kind": "sql#operation",
  "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id",
  "status": "PENDING",
  "user": "user@example.com",
  "insertTime": "2020-01-16T02:32:12.281Z",
  "operationType": "UPDATE",
  "name": "operation-id",
  "targetId": "instance-id",
  "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/operations/operation-id",
  "targetProject": "project-id"

If the patch modifies a value that requires a restart, you will see a prompt to proceed with the change or cancel.

To see how the underlying REST API request is constructed for this task, see the APIs Explorer on the instances:patch page.