setTargetPools method

Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.

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> setTargetPools(
  SetTargetPoolsRegionInstanceGroupManagerRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_setTargetPools case final setTargetPools?) {
    return setTargetPools(request);
  }
  throw UnsupportedError('setTargetPools');
}