Fail over a reservation to the secondary location. The operation should be done in the current secondary location, which will be promoted to the new primary location for the reservation. Attempting to failover a reservation in the current primary location will fail with the error code google.rpc.Code.FAILED_PRECONDITION.
HTTP request
POST https://bigqueryreservation.googleapis.com/v1/{name=projects/*/locations/*/reservations/*}:failoverReservation
Optional. A parameter that determines how writes that are pending replication are handled after a failover is initiated. If not specified, HARD failover mode is used by default.
Response body
If successful, the response body contains an instance of Reservation.
The failover mode when a user initiates a failover on a reservation determines how writes that are pending replication are handled after the failover is initiated.
Enums
FAILOVER_MODE_UNSPECIFIED
Invalid value.
SOFT
When customers initiate a soft failover, BigQuery will wait until all committed writes are replicated to the secondary. This mode requires both regions to be available for the failover to succeed and prevents data loss.
HARD
When customers initiate a hard failover, BigQuery will not wait until all committed writes are replicated to the secondary. There can be data loss for hard 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-09-02 UTC."],[[["\u003cp\u003eThis webpage details the process of failing over a reservation to a secondary location, which will then become the new primary.\u003c/p\u003e\n"],["\u003cp\u003eThe operation is performed via an HTTP POST request to a specific URL, requiring a defined resource name as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body for this operation must be empty, and it requires \u003ccode\u003ebigquery.reservations.update\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eA successful request returns a \u003ccode\u003eReservation\u003c/code\u003e resource instance in the response body, detailing the updated reservation status.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this operation requires either the \u003ccode\u003ehttps://www.googleapis.com/auth/bigquery\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.reservations.failoverReservation\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- [Try it!](#try-it)\n\nFail over a reservation to the secondary location. The operation should be done in the current secondary location, which will be promoted to the new primary location for the reservation. Attempting to failover a reservation in the current primary location will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.\n\n### HTTP request\n\n`POST https://bigqueryreservation.googleapis.com/v1/{name=projects/*/locations/*/reservations/*}:failoverReservation`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Reservation](/bigquery/docs/reference/reservations/rest/v1/projects.locations.reservations#Reservation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/bigquery`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]