addHealthCheck method

  1. @override
Future<Operation> addHealthCheck(
  1. AddHealthCheckTargetPoolRequest request
)
override

Adds health check URLs to a 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<Operation> addHealthCheck(
  AddHealthCheckTargetPoolRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_addHealthCheck case final addHealthCheck?) {
    return addHealthCheck(request);
  }
  throw UnsupportedError('addHealthCheck');
}