Method: instances.demote

Demotes a standalone instance to be a Cloud SQL read replica for an external database server.

HTTP request

POST https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/demote

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
project

string

Required. ID of the project that contains the instance.

instance

string

Required. Cloud SQL instance name.

Request body

The request body contains an instance ofInstancesDemoteRequest.

Response body

If successful, the response body contains an instance ofOperation.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/sqlservice.admin

For more information, see theAuthentication Overview.

InstancesDemoteRequest

This request is used to demote a standalone instance to be a Cloud SQL read replica for an external database server.

JSON representation
{"demoteContext":{object (DemoteContext)}}
Fields
demoteContext

object (DemoteContext)

Required. Contains details about the demote operation.

DemoteContext

This context is used to demote a standalone instance to be a Cloud SQL read replica for an external database server.

JSON representation
{"kind":string,"sourceRepresentativeInstanceName":string}
Fields
kind

string

This is alwayssql#demoteContext.

sourceRepresentativeInstanceName

string

Required. The name of the instance which acts as the on-premises primary instance in the replication setup.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-30 UTC.