Method: googleapis.spanner.v1.projects.instances.move

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/.

body

object (MoveInstanceRequest)

Required.

Raised exceptions

Exceptions
ConnectionError In case of a network problem (such as DNS failure or refused connection).
HttpError If the response status is >= 400 (excluding 429 and 503).
TimeoutError If a long-running operation takes longer to finish than the specified timeout limit.
TypeError If an operation or function receives an argument of the wrong type.
ValueError If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout.
OperationError If the long-running operation finished unsuccessfully.
ResponseTypeError If the long-running operation returned a response of the wrong type.

Response

If successful, the response contains an instance of Operation.

Subworkflow snippet

Some fields might be optional or required. To identify required fields, refer to the API documentation.

YAML

- move:
    call: googleapis.spanner.v1.projects.instances.move
    args:
        name: ...
        body:
            targetConfig: ...
    result: moveResult

JSON

[
  {
    "move": {
      "call": "googleapis.spanner.v1.projects.instances.move",
      "args": {
        "name": "...",
        "body": {
          "targetConfig": "..."
        }
      },
      "result": "moveResult"
    }
  }
]