enableXpnResource method

  1. @override
Future<Operation> enableXpnResource(
  1. EnableXpnResourceProjectRequest request
)
override

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

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

  if (_enableXpnResource case final enableXpnResource?) {
    return enableXpnResource(request);
  }
  throw UnsupportedError('enableXpnResource');
}