enableXpnResource method

Future<Operation> enableXpnResource(
  1. EnableXpnResourceProjectRequest request
)

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

Future<Operation> enableXpnResource(
  EnableXpnResourceProjectRequest request,
) async {
  final url = _endPoint.replace(
    path: '/compute/v1/projects/${request.project}/enableXpnResource',
    queryParameters: {'requestId': ?request.requestId},
  );
  final response = await _client.post(
    url,
    body: request.projectsEnableXpnResourceRequestResource,
  );
  return Operation.fromJson(response);
}