Method: projects.locations.instances.failover

instances.failover the instance to its failover replica instance. Using this operation might cause your instance to restart.

HTTP request

POST https://sqladmin.googleapis.com/v1/{parent=projects/*/locations/*/instances/*}/failover

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The parent resource where Cloud SQL sends this database instance during a failover. Format: projects/{project}/locations/{location}/instances/{instance}

project: ID of the project that contains the read replica. instance: Cloud SQL instance ID. This does not include the project ID.

Request body

The request body contains an instance of InstancesFailoverRequest.

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.

InstancesFailoverRequest

Instance failover request.

JSON representation
{
  "failoverContext": {
    object (FailoverContext)
  }
}
Fields
failoverContext

object (FailoverContext)

instances.failover Context.

FailoverContext

Database instance failover context.

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

string (int64 format)

The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.

kind

string

This is always sql#failoverContext.