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.

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
    Database version
    Database version Console: SQL Server 2017 Standard (default), SQL Server 2017 Enterprise, SQL Server 2017 Web, or SQL Server 2017 Express.
    API: SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_WEB, SQLSERVER_2017_EXPRESS
    Connectivity
    Private IP Adds a private IP address for your instance. To enable connecting to the instance, additional configuration is required. .
    Public IP Adds a public IP address for your instance. To enable connecting to the instance, additional configuration is required.
    Machine type and 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.
    Automatic storage increase Determines whether Cloud SQL automatically provides more storage for your instance when free space runs low. Learn more.
    High availability If you need your instance to be configured for high availability, you must select the High availability (regional) checkbox. Learn more.
    Automatic backups The window of time when you would like backups to start.
    Add database flags
    Database flags You can use database flags to control settings and parameters for your instance. Learn more.
    Maintenance schedule
    Maintenance 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.
    Maintenance timing Your preferred timing for instance updates, relative to other instances in the same project. Learn more.

    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://www.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://www.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://www.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.