- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- InstancesFailoverRequest
- FailoverContext
- Examples
- Try it!
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/sql/v1beta4/projects/{project}/instances/{instance}/failover
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
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 ( |
Fields | |
---|---|
failoverContext |
instances.failover Context. |
FailoverContext
Database instance failover context.
JSON representation | |
---|---|
{ "settingsVersion": string, "kind": string } |
Fields | |
---|---|
settingsVersion |
The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version. |
kind |
This is always sql#failoverContext. |