Demotes the destination database to become a read replica of the source. This is applicable for the following migrations: 1. MySQL to Cloud SQL for MySQL 2. PostgreSQL to Cloud SQL for PostgreSQL 3. PostgreSQL to AlloyDB for PostgreSQL.
HTTP request
POST https://datamigration.googleapis.com/v1/{name}:demoteDestination
Path parameters
Parameters
name
string
Name of the migration job resource to demote its destination.
Authorization requires the following IAM permission on the specified resource name:
datamigration.migrationjobs.demoteDestination
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of Operation.
[[["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-07-28 UTC."],[[["\u003cp\u003eThis webpage outlines how to demote a destination database to a read replica of the source during specific database migrations, including MySQL to Cloud SQL and PostgreSQL to Cloud SQL or AlloyDB.\u003c/p\u003e\n"],["\u003cp\u003eThe process is initiated with a \u003ccode\u003ePOST\u003c/code\u003e request to the specified endpoint: \u003ccode\u003ehttps://datamigration.googleapis.com/v1/{name}:demoteDestination\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the migration job resource name as a path parameter, with corresponding IAM permission, and the request body must be empty.\u003c/p\u003e\n"],["\u003cp\u003eA successful request will return an Operation instance, in the response body, for tracking the database demotion.\u003c/p\u003e\n"],["\u003cp\u003eThe operation requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.migrationJobs.demoteDestination\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- [Examples](#examples)\n- [Try it!](#try-it)\n\nDemotes the destination database to become a read replica of the source. This is applicable for the following migrations: 1. MySQL to Cloud SQL for MySQL 2. PostgreSQL to Cloud SQL for PostgreSQL 3. PostgreSQL to AlloyDB for PostgreSQL.\n\n### HTTP request\n\n`POST https://datamigration.googleapis.com/v1/{name}:demoteDestination`\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 [Operation](/database-migration/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]