Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.
HTTP request
POST https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/failover
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-30 UTC."],[],[],null,["# Method: instances.failover\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n- [InstancesFailoverRequest](#InstancesFailoverRequest)\n - [JSON representation](#InstancesFailoverRequest.SCHEMA_REPRESENTATION)\n- [FailoverContext](#FailoverContext)\n - [JSON representation](#FailoverContext.SCHEMA_REPRESENTATION)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nInitiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the [Overview of high availability](https://cloud.google.com/sql/docs/postgres/high-availability) page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.\n\n### HTTP request\n\n`POST https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/failover`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains an instance of [InstancesFailoverRequest](/sql/docs/postgres/admin-api/rest/v1/instances/failover#InstancesFailoverRequest).\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/sql/docs/postgres/admin-api/rest/v1/operations#Operation).\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/sqlservice.admin`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\nInstancesFailoverRequest\n------------------------\n\nInstance failover request.\n\nFailoverContext\n---------------\n\nDatabase instance failover context."]]