moveInstance method

Future<Operation> moveInstance(
  1. MoveInstanceProjectRequest request
)

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.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

Future<Operation> moveInstance(MoveInstanceProjectRequest request) async {
  final url = _endPoint.replace(
    path: '/compute/v1/projects/${request.project}/moveInstance',
    queryParameters: {'requestId': ?request.requestId},
  );
  final response = await _client.post(
    url,
    body: request.instanceMoveRequestResource,
  );
  return Operation.fromJson(response);
}