---
title: "POST /v1/{+service}:startMigration"
method: POST
path: "/v1/{+service}:startMigration"
tags: ["projects"]
---

# POST /v1/{+service}:startMigration

`POST /v1/{+service}:startMigration`

Starts the Managed Migration process.

## Path parameters

- `service` string, required

## Request body

- StartMigrationRequest — Request message for DataprocMetastore.StartMigration.
  - `migrationExecution` MigrationExecution — The details of a migration execution resource.
    - `cloudSqlMigrationConfig` CloudSQLMigrationConfig — Deprecated: Migrations to Dataproc Metastore are no longer supported. Use BigLake Metastore migration instead. Configuration information for migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore.
      - `cdcConfig` CdcConfig — Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore.
        - `subnetIpRange` string — Required. A /29 CIDR IP range for peering with datastream.
        - `bucket` string — Optional. The bucket to write the intermediate stream event data in. The bucket name must be without any prefix like "gs://". See the bucket naming requirements (https://cloud.google.com/storage/docs/buckets#naming). This field is optional. If not set, the Artifacts Cloud Storage bucket will be used.
        - `password` string — Required. Input only. The password for the user that Datastream service should use for the MySQL connection. This field is not returned on request.
        - `vpcNetwork` string — Required. Fully qualified name of the Cloud SQL instance's VPC network or the shared VPC network that Datastream will peer to, in the following format: projects/{project_id}/locations/global/networks/{network_id}. More context in https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity
        - `username` string — Required. The username that the Datastream service should use for the MySQL connection.
        - `reverseProxySubnet` string — Required. The URL of the subnetwork resource to create the VM instance hosting the reverse proxy in. More context in https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy The subnetwork should reside in the network provided in the request that Datastream will peer to and should be in the same region as Datastream, in the following format. projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}
        - `rootPath` string — Optional. The root path inside the Cloud Storage bucket. The stream event data will be written to this path. The default value is /migration.
      - `cloudSqlConnectionConfig` CloudSQLConnectionConfig — Configuration information to establish customer database connection before the cutover phase of migration
        - `port` integer — Required. The network port of the database.
        - `password` string — Required. Input only. The password for the user that Dataproc Metastore service will be using to connect to the database. This field is not returned on request.
        - `natSubnet` string — Required. The relative resource name of the subnetwork to be used for Private Service Connect. Note that this cannot be a regular subnet and is used only for NAT. (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) This subnet is used to publish the SOCKS5 proxy service. The subnet size must be at least /29 and it should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}
        - `ipAddress` string — Required. The private IP address of the Cloud SQL instance.
        - `hiveDatabaseName` string — Required. The hive database name.
        - `username` string — Required. The username that Dataproc Metastore service will use to connect to the database.
        - `proxySubnet` string — Required. The relative resource name of the subnetwork to deploy the SOCKS5 proxy service in. The subnetwork should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}
        - `instanceConnectionName` string — Required. Cloud SQL database connection name (project_id:region:instance_name)
    - `phase` 'PHASE_UNSPECIFIED' | 'REPLICATION' | 'CUTOVER' — Output only. Deprecated: Phase was designed for incoming migrations to Dataproc Metastore, not applicable when migrating away from it. The current phase of the migration execution.
    - `stateMessage` string — Output only. Additional information about the current state of the migration execution.
    - `state` 'STATE_UNSPECIFIED' | 'STARTING' | 'RUNNING' | 'CANCELLING' | 'AWAITING_USER_ACTION' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED' | 'DELETING' — Output only. The current state of the migration execution.
    - `createTime` string, google-datetime — Output only. The time when the migration execution was started.
    - `name` string — Output only. The relative resource name of the migration execution, in the following form: projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}
    - `endTime` string, google-datetime — Output only. The time when the migration execution finished.
  - `requestId` string — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/metastore.md) · [All operations](https://skmtc.net/google/apis/metastore/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/metastore/versions/303a0939d73e/schema)
