Stay organized with collections
Save and categorize content based on your preferences.
Moves an instance and its attached persistent disks from one zone to
another. Note: Moving VMs or disks by using this method might cause
unexpected behavior. For more information, see the known
issue.
[Deprecated] This method is deprecated. See moving instance across
zones instead.
This method waits—the workflow execution is paused—until the operation is
complete, fails, or times out. The default timeout value is 1800 seconds (30
minutes) and can be changed to a maximum value of 31536000 seconds (one year)
for long-running operations using the connector_params field. See the
Connectors reference.
The connector uses polling to monitor the long-running operation, which might
generate additional billable steps. For more information about retries and
long-running operations, refer to Understand connectors.
The polling policy for the long-running operation can be configured. To set the
connector-specific parameters (connector_params), refer to
Invoke a connector call.
Arguments
Parameters
project
string
Required. Project ID for this request.
requestId
string
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
[[["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-04 UTC."],[],[],null,["# Method: googleapis.compute.beta.projects.moveInstance\n\nMoves an instance and its attached persistent disks from one zone to\nanother. *Note* : Moving VMs or disks by using this method might cause\nunexpected behavior. For more information, see the [known\nissue](/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).\n\\[Deprecated\\] This method is deprecated. See [moving instance across\nzones](/compute/docs/instances/moving-instance-across-zones) instead.\n\nThis method waits---the workflow execution is paused---until the operation is\ncomplete, fails, or times out. The default timeout value is `1800` seconds (30\nminutes) and can be changed to a maximum value of `31536000` seconds (one year)\nfor long-running operations using the `connector_params` field. See the\n[Connectors reference](/workflows/docs/reference/googleapis).\n\nThe connector uses polling to monitor the long-running operation, which might\ngenerate additional billable steps. For more information about retries and\nlong-running operations, refer to [Understand connectors](/workflows/docs/connectors).\n\nThe polling policy for the long-running operation can be configured. To set the\nconnector-specific parameters (`connector_params`), refer to\n[Invoke a connector call](/workflows/docs/reference/googleapis#invoke_a_connector_call).\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`Operation`](/workflows/docs/reference/googleapis/compute/beta/Overview#Operation).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/projects/moveInstance). \n\n### YAML\n\n```yaml\n- moveInstance:\n call: googleapis.compute.beta.projects.moveInstance\n args:\n project: ...\n requestId: ...\n body:\n destinationZone: ...\n targetInstance: ...\n result: moveInstanceResult\n```\n\n### JSON\n\n```json\n[\n {\n \"moveInstance\": {\n \"call\": \"googleapis.compute.beta.projects.moveInstance\",\n \"args\": {\n \"project\": \"...\",\n \"requestId\": \"...\",\n \"body\": {\n \"destinationZone\": \"...\",\n \"targetInstance\": \"...\"\n }\n },\n \"result\": \"moveInstanceResult\"\n }\n }\n]\n```"]]