Method: 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.

instances.move 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 defaultLeader 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 <instance_name>/operations/<operationId> 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 cancelTime. 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.

HTTP request

POST https://spanner.googleapis.com/v1/{name=projects/*/instances/*}:move

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The instance to move. Values are of the form projects/<project>/instances/<instance>.

Authorization requires the following IAM permission on the specified resource name:

  • spanner.instances.update

Request body

The request body contains data with the following structure:

JSON representation
{
  "targetConfig": string
}
Fields
targetConfig

string

Required. The target instance configuration where to move the instance. Values are of the form projects/<project>/instanceConfigs/<config>.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/spanner.admin
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.