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.
Edit an instance
Most edits can be applied to an instance only when it's running.
Console
-
In the Google Cloud Console, go to the Cloud SQL Instances page.
- To open the Overview page of an instance, click the instance name.
- Click Edit.
- In the Configuration options section, update editable settings for
your instance.
Setting Notes Machine type Machine type Select from Lightweight, Standard (Most common), or High memory. Custom Select this button to create an instance with a custom 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 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 encryption The default option. Customer key-managed encryption key (CMEK) Select to use your key with Google Cloud Key Management Service. Learn more. Connectivity Private IP Adds a private IP address for your instance. To enable connecting to the instance, additional configuration is required.
Optionally, you can specify an allocated IP range for your instances to use for connections.- Expand Show allocated IP range option.
- Select an IP range from the drop-down menu.
Your instance can have both a public and a private IP address.
- Learn more about using private IP.
- Learn more about allocated IP address ranges.
Public IP Adds a public IP address for your instance. You can then add authorized networks to connect to the instance. Your instance can have both a public and a private IP address.
Learn more about using public IP.
Authorized networks Add 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 backups Select 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 store The 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 LABEL Add a key and value for each label that you add. You use labels to help organize your instances. Learn more about instance settings.
- 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 v1
The following command modifies the backup start time.
Before using any of the request data, make the following replacements:
- project-id: The project ID
- instance-id: The instance ID
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/v1/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/v1/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/v1/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.
REST v1beta4
The following command modifies the backup start time.
Before using any of the request data, 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.