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.
You also can enable or disable database auditing.
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 Customize your instance section, if the Show configuration options menu appears, then click it.
Update any editable settings for your instance.
Learn more about instance settings.
- Click Save.
gcloud
This command modifies the backup start time.
gcloud sql instances patch INSTANCE_NAME \ --backup-start-time 16:00
If a patch modifies a value that requires a restart, then you see a prompt to proceed with the change or cancel.
To learn more about instance configuration flags, see gcloud sql instances patch.
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.
- private-network: The network that you're adding or selecting to create a private connection.
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 } } "ipConfiguration": { "privateNetwork": "private-network", "authorizedNetworks": [], "ipv4Enabled": false, } }
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 a 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.
- private-network: The network that you're adding or selecting to create a private connection.
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 } } "ipConfiguration": { "privateNetwork": "private-network", "authorizedNetworks": [], "ipv4Enabled": false, } }
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.