insert method
Creates a network endpoint group in the specified project using the parameters that are included in the request.
Note: Use the following APIs to manage network endpoint groups:
To manage NEGs with zonal scope (such as zonal NEGs, hybrid connectivity NEGs): zonal API
To manage NEGs with regional scope (such as regional internet NEGs, serverless NEGs, Private Service Connect NEGs): regional API
To manage NEGs with global scope (such as global internet NEGs):global API
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> insert(InsertNetworkEndpointGroupRequest request) async {
final url = _endPoint.replace(
path:
'/compute/v1/projects/${request.project}/zones/${request.zone}/networkEndpointGroups',
queryParameters: {'requestId': ?request.requestId},
);
final response = await _client.post(
url,
body: request.networkEndpointGroupResource,
);
return Operation.fromJson(response);
}