Editing instances

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

After you create an instance, you can edit the instance at any time 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

Console

  1. Go to the Cloud SQL Instances page in the Google Cloud Console.

    Go to the Cloud SQL Instances page

  2. Select an instance to edit by clicking the instance name.
  3. Click Edit.
  4. Under Configuration options, 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.
    Connectivity
    Cores The number of vCPUs for your instance. Learn more.
    Memory The amount of memory for your instance, in GBs. Learn more.
    Storage
    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.
    Encryption
    Google-managed encryptionThe default option.
    Customer key-managed encryption key (CMEK)Select to use your key with Google Cloud Key Management Service. Learn more.
    Connections
    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.
    Backups
    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.
    Maintenance
    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.
    Flags
    ADD FLAG You can use database flags to control settings and parameters for your instance. Learn more.
    Labels
    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.

gcloud

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.