setMachineResources method

  1. @override
Future<Operation> setMachineResources(
  1. SetMachineResourcesInstanceRequest request
)
override

Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.

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

@override
Future<Operation> setMachineResources(
  SetMachineResourcesInstanceRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_setMachineResources case final setMachineResources?) {
    return setMachineResources(request);
  }
  throw UnsupportedError('setMachineResources');
}