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/sql/v1beta4/projects/{project}/instances/{instance}/demote

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Required. The project ID of the project that contains the instance.

instance

string

Required. The name of the Cloud SQL instance.

Request body

The request body contains an instance of InstancesDemoteRequest.

Response body

If successful, the response body contains an instance of Operation.

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 the Authentication 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. This context is used to demote a standalone instance to be a Cloud SQL read replica for an external database server.

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 always sql#demoteContext.

sourceRepresentativeInstanceName

string

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