getHealth method

Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.

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

  if (_getHealth case final getHealth?) {
    return getHealth(request);
  }
  throw UnsupportedError('getHealth');
}