Method: instances.switchover

Switches over from the primary instance to the designated DR replica instance.

HTTP request

POST https://sqladmin.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/switchover

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

ID of the project that contains the replica.

instance

string

Cloud SQL read replica instance name.

Query parameters

Parameters
dbTimeout

string (Duration format)

Optional. (MySQL only) Cloud SQL instance operations timeout, which is a sum of all database operations. Default value is 10 minutes and can be modified to a maximum value of 24 hours.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Request body

The request body must be empty.

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.