Stay organized with collections
Save and categorize content based on your preferences.
Moves an instance to the target instance configuration. You can use the
returned long-running operation to track the progress of moving the
instance. MoveInstance returns FAILED_PRECONDITION if the instance
meets any of the following criteria: * Is undergoing a move to a
different instance configuration * Has backups * Has an ongoing update *
Contains any CMEK-enabled databases * Is a free trial instance While the
operation is pending: * All other attempts to modify the instance,
including changes to its compute capacity, are rejected. * The following
database and backup admin operations are rejected: *
DatabaseAdmin.CreateDatabase * DatabaseAdmin.UpdateDatabaseDdl
(disabled if default_leader is specified in the request.) *
DatabaseAdmin.RestoreDatabase * DatabaseAdmin.CreateBackup *
DatabaseAdmin.CopyBackup * Both the source and target instance
configurations are subject to hourly compute and storage charges. * The
instance might experience higher read-write latencies and a higher
transaction abort rate. However, moving an instance doesn't cause any
downtime. The returned long-running operation has a name of the format
/operations/ and can be used to track the move instance operation. The
metadata field type is MoveInstanceMetadata. The response field type is
Instance, if successful. Cancelling the operation sets its metadata's
cancel_time. Cancellation is not immediate because it involves moving
any data previously moved to the target instance configuration back to
the original instance configuration. You can use this operation to track
the progress of the cancellation. Upon successful completion of the
cancellation, the operation terminates with CANCELLED status. If not
cancelled, upon completion of the returned operation: * The instance
successfully moves to the target instance configuration. * You are
billed for compute and storage in target instance configuration.
Authorization requires the spanner.instances.update permission on the
resource instance. For more details, see Move an
instance.
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.
The connector uses polling to monitor the long-running operation, which might
generate additional billable steps. The polling policy for the long-running
operation can be configured. For example, if you set skip_polling to True,
the connector invocation call is non-blocking if the initial request succeeds;
otherwise, retries might occur.
For more information about connector-specific parameters (connector_params),
see Invoke a connector call.
For more information about retries and long-running operations, see
Understand connectors.
Arguments
Parameters
name
string
Required. The instance to move. Values are of the form projects//instances/.
[[["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.spanner.v1.projects.instances.move\n\nMoves an instance to the target instance configuration. You can use the\nreturned long-running operation to track the progress of moving the\ninstance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance\nmeets any of the following criteria: \\* Is undergoing a move to a\ndifferent instance configuration \\* Has backups \\* Has an ongoing update \\*\nContains any CMEK-enabled databases \\* Is a free trial instance While the\noperation is pending: \\* All other attempts to modify the instance,\nincluding changes to its compute capacity, are rejected. \\* The following\ndatabase and backup admin operations are rejected: \\*\n`DatabaseAdmin.CreateDatabase` \\* `DatabaseAdmin.UpdateDatabaseDdl`\n(disabled if default_leader is specified in the request.) \\*\n`DatabaseAdmin.RestoreDatabase` \\* `DatabaseAdmin.CreateBackup` \\*\n`DatabaseAdmin.CopyBackup` \\* Both the source and target instance\nconfigurations are subject to hourly compute and storage charges. \\* The\ninstance might experience higher read-write latencies and a higher\ntransaction abort rate. However, moving an instance doesn't cause any\ndowntime. The returned long-running operation has a name of the format\n`/operations/` and can be used to track the move instance operation. The\nmetadata field type is MoveInstanceMetadata. The response field type is\nInstance, if successful. Cancelling the operation sets its metadata's\ncancel_time. Cancellation is not immediate because it involves moving\nany data previously moved to the target instance configuration back to\nthe original instance configuration. You can use this operation to track\nthe progress of the cancellation. Upon successful completion of the\ncancellation, the operation terminates with `CANCELLED` status. If not\ncancelled, upon completion of the returned operation: \\* The instance\nsuccessfully moves to the target instance configuration. \\* You are\nbilled for compute and storage in target instance configuration.\nAuthorization requires the `spanner.instances.update` permission on the\nresource instance. For more details, see [Move an\ninstance](https://cloud.google.com/spanner/docs/move-instance).\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.\n\nThe connector uses polling to monitor the long-running operation, which might\ngenerate additional billable steps. The polling policy for the long-running\noperation can be configured. For example, if you set `skip_polling` to `True`,\nthe connector invocation call is non-blocking if the initial request succeeds;\notherwise, retries might occur.\n\nFor more information about connector-specific parameters (`connector_params`),\nsee [Invoke a connector call](/workflows/docs/reference/googleapis#invoke_a_connector_call).\n\nFor more information about retries and long-running operations, see\n[Understand connectors](/workflows/docs/connectors).\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`Operation`](https://cloud.google.com/workflows/docs/reference/googleapis/spanner/v1/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/spanner/docs/reference/rest/v1/projects.instances/move). \n\n### YAML\n\n```yaml\n- move:\n call: googleapis.spanner.v1.projects.instances.move\n args:\n name: ...\n body:\n targetConfig: ...\n result: moveResult\n```\n\n### JSON\n\n```json\n[\n {\n \"move\": {\n \"call\": \"googleapis.spanner.v1.projects.instances.move\",\n \"args\": {\n \"name\": \"...\",\n \"body\": {\n \"targetConfig\": \"...\"\n }\n },\n \"result\": \"moveResult\"\n }\n }\n]\n```"]]