Class NetworkEndpointGroupsClient (1.8.1)

public class NetworkEndpointGroupsClient implements BackgroundResource

Service Description: The NetworkEndpointGroups API.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   String networkEndpointGroup = "networkEndpointGroup-2120389028";
   NetworkEndpointGroup response =
       networkEndpointGroupsClient.get(project, zone, networkEndpointGroup);
 }
 

Note: close() needs to be called on the NetworkEndpointGroupsClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of NetworkEndpointGroupsSettings to create(). For example:

To customize credentials:


 NetworkEndpointGroupsSettings networkEndpointGroupsSettings =
     NetworkEndpointGroupsSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create(networkEndpointGroupsSettings);
 

To customize the endpoint:


 NetworkEndpointGroupsSettings networkEndpointGroupsSettings =
     NetworkEndpointGroupsSettings.newBuilder().setEndpoint(myEndpoint).build();
 NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create(networkEndpointGroupsSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > NetworkEndpointGroupsClient

Implements

BackgroundResource

Static Methods

create()

public static final NetworkEndpointGroupsClient create()

Constructs an instance of NetworkEndpointGroupsClient with default settings.

Returns
TypeDescription
NetworkEndpointGroupsClient
Exceptions
TypeDescription
IOException

create(NetworkEndpointGroupsSettings settings)

public static final NetworkEndpointGroupsClient create(NetworkEndpointGroupsSettings settings)

Constructs an instance of NetworkEndpointGroupsClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsNetworkEndpointGroupsSettings
Returns
TypeDescription
NetworkEndpointGroupsClient
Exceptions
TypeDescription
IOException

create(NetworkEndpointGroupsStub stub)

public static final NetworkEndpointGroupsClient create(NetworkEndpointGroupsStub stub)

Constructs an instance of NetworkEndpointGroupsClient, using the given stub for making calls. This is for advanced usage - prefer using create(NetworkEndpointGroupsSettings).

Parameter
NameDescription
stubNetworkEndpointGroupsStub
Returns
TypeDescription
NetworkEndpointGroupsClient

Constructors

NetworkEndpointGroupsClient(NetworkEndpointGroupsSettings settings)

protected NetworkEndpointGroupsClient(NetworkEndpointGroupsSettings settings)

Constructs an instance of NetworkEndpointGroupsClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
NameDescription
settingsNetworkEndpointGroupsSettings

NetworkEndpointGroupsClient(NetworkEndpointGroupsStub stub)

protected NetworkEndpointGroupsClient(NetworkEndpointGroupsStub stub)
Parameter
NameDescription
stubNetworkEndpointGroupsStub

Methods

aggregatedList(AggregatedListNetworkEndpointGroupsRequest request)

public final NetworkEndpointGroupsClient.AggregatedListPagedResponse aggregatedList(AggregatedListNetworkEndpointGroupsRequest request)

Retrieves the list of network endpoint groups and sorts them by zone.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   AggregatedListNetworkEndpointGroupsRequest request =
       AggregatedListNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .build();
   for (Map.Entry
Parameter
NameDescription
requestAggregatedListNetworkEndpointGroupsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
NetworkEndpointGroupsClient.AggregatedListPagedResponse

aggregatedList(String project)

public final NetworkEndpointGroupsClient.AggregatedListPagedResponse aggregatedList(String project)

Retrieves the list of network endpoint groups and sorts them by zone.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   for (Map.Entry
Parameter
NameDescription
projectString

Project ID for this request.

Returns
TypeDescription
NetworkEndpointGroupsClient.AggregatedListPagedResponse

aggregatedListCallable()

public final UnaryCallable<AggregatedListNetworkEndpointGroupsRequest,NetworkEndpointGroupAggregatedList> aggregatedListCallable()

Retrieves the list of network endpoint groups and sorts them by zone.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   AggregatedListNetworkEndpointGroupsRequest request =
       AggregatedListNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     NetworkEndpointGroupAggregatedList response =
         networkEndpointGroupsClient.aggregatedListCallable().call(request);
     for (Map.Entry
Returns
TypeDescription
UnaryCallable<AggregatedListNetworkEndpointGroupsRequest,NetworkEndpointGroupAggregatedList>

aggregatedListPagedCallable()

public final UnaryCallable<AggregatedListNetworkEndpointGroupsRequest,NetworkEndpointGroupsClient.AggregatedListPagedResponse> aggregatedListPagedCallable()

Retrieves the list of network endpoint groups and sorts them by zone.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   AggregatedListNetworkEndpointGroupsRequest request =
       AggregatedListNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<>
Returns
TypeDescription
UnaryCallable<AggregatedListNetworkEndpointGroupsRequest,AggregatedListPagedResponse>

attachNetworkEndpointsAsync(AttachNetworkEndpointsNetworkEndpointGroupRequest request)

public final OperationFuture<Operation,Operation> attachNetworkEndpointsAsync(AttachNetworkEndpointsNetworkEndpointGroupRequest request)

Attach a list of network endpoints to the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   AttachNetworkEndpointsNetworkEndpointGroupRequest request =
       AttachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsAttachEndpointsRequestResource(
               NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   Operation response = networkEndpointGroupsClient.attachNetworkEndpointsAsync(request).get();
 }
 
Parameter
NameDescription
requestAttachNetworkEndpointsNetworkEndpointGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Operation,Operation>

attachNetworkEndpointsAsync(String project, String zone, String networkEndpointGroup, NetworkEndpointGroupsAttachEndpointsRequest networkEndpointGroupsAttachEndpointsRequestResource)

public final OperationFuture<Operation,Operation> attachNetworkEndpointsAsync(String project, String zone, String networkEndpointGroup, NetworkEndpointGroupsAttachEndpointsRequest networkEndpointGroupsAttachEndpointsRequestResource)

Attach a list of network endpoints to the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   String networkEndpointGroup = "networkEndpointGroup-2120389028";
   NetworkEndpointGroupsAttachEndpointsRequest
       networkEndpointGroupsAttachEndpointsRequestResource =
           NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
   Operation response =
       networkEndpointGroupsClient
           .attachNetworkEndpointsAsync(
               project,
               zone,
               networkEndpointGroup,
               networkEndpointGroupsAttachEndpointsRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone where the network endpoint group is located. It should comply with RFC1035.

networkEndpointGroupString

The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.

networkEndpointGroupsAttachEndpointsRequestResourceNetworkEndpointGroupsAttachEndpointsRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

attachNetworkEndpointsCallable()

public final UnaryCallable<AttachNetworkEndpointsNetworkEndpointGroupRequest,Operation> attachNetworkEndpointsCallable()

Attach a list of network endpoints to the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   AttachNetworkEndpointsNetworkEndpointGroupRequest request =
       AttachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsAttachEndpointsRequestResource(
               NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   ApiFuture<Operation> future =
       networkEndpointGroupsClient.attachNetworkEndpointsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<AttachNetworkEndpointsNetworkEndpointGroupRequest,Operation>

attachNetworkEndpointsOperationCallable()

public final OperationCallable<AttachNetworkEndpointsNetworkEndpointGroupRequest,Operation,Operation> attachNetworkEndpointsOperationCallable()

Attach a list of network endpoints to the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   AttachNetworkEndpointsNetworkEndpointGroupRequest request =
       AttachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsAttachEndpointsRequestResource(
               NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   OperationFuture
Returns
TypeDescription
OperationCallable<AttachNetworkEndpointsNetworkEndpointGroupRequest,Operation,Operation>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

deleteAsync(DeleteNetworkEndpointGroupRequest request)

public final OperationFuture<Operation,Operation> deleteAsync(DeleteNetworkEndpointGroupRequest request)

Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   DeleteNetworkEndpointGroupRequest request =
       DeleteNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   Operation response = networkEndpointGroupsClient.deleteAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteNetworkEndpointGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteAsync(String project, String zone, String networkEndpointGroup)

public final OperationFuture<Operation,Operation> deleteAsync(String project, String zone, String networkEndpointGroup)

Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   String networkEndpointGroup = "networkEndpointGroup-2120389028";
   Operation response =
       networkEndpointGroupsClient.deleteAsync(project, zone, networkEndpointGroup).get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone where the network endpoint group is located. It should comply with RFC1035.

networkEndpointGroupString

The name of the network endpoint group to delete. It should comply with RFC1035.

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteCallable()

public final UnaryCallable<DeleteNetworkEndpointGroupRequest,Operation> deleteCallable()

Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   DeleteNetworkEndpointGroupRequest request =
       DeleteNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   ApiFuture<Operation> future =
       networkEndpointGroupsClient.deleteCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteNetworkEndpointGroupRequest,Operation>

deleteOperationCallable()

public final OperationCallable<DeleteNetworkEndpointGroupRequest,Operation,Operation> deleteOperationCallable()

Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   DeleteNetworkEndpointGroupRequest request =
       DeleteNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   OperationFuture
Returns
TypeDescription
OperationCallable<DeleteNetworkEndpointGroupRequest,Operation,Operation>

detachNetworkEndpointsAsync(DetachNetworkEndpointsNetworkEndpointGroupRequest request)

public final OperationFuture<Operation,Operation> detachNetworkEndpointsAsync(DetachNetworkEndpointsNetworkEndpointGroupRequest request)

Detach a list of network endpoints from the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   DetachNetworkEndpointsNetworkEndpointGroupRequest request =
       DetachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsDetachEndpointsRequestResource(
               NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   Operation response = networkEndpointGroupsClient.detachNetworkEndpointsAsync(request).get();
 }
 
Parameter
NameDescription
requestDetachNetworkEndpointsNetworkEndpointGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Operation,Operation>

detachNetworkEndpointsAsync(String project, String zone, String networkEndpointGroup, NetworkEndpointGroupsDetachEndpointsRequest networkEndpointGroupsDetachEndpointsRequestResource)

public final OperationFuture<Operation,Operation> detachNetworkEndpointsAsync(String project, String zone, String networkEndpointGroup, NetworkEndpointGroupsDetachEndpointsRequest networkEndpointGroupsDetachEndpointsRequestResource)

Detach a list of network endpoints from the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   String networkEndpointGroup = "networkEndpointGroup-2120389028";
   NetworkEndpointGroupsDetachEndpointsRequest
       networkEndpointGroupsDetachEndpointsRequestResource =
           NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
   Operation response =
       networkEndpointGroupsClient
           .detachNetworkEndpointsAsync(
               project,
               zone,
               networkEndpointGroup,
               networkEndpointGroupsDetachEndpointsRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone where the network endpoint group is located. It should comply with RFC1035.

networkEndpointGroupString

The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.

networkEndpointGroupsDetachEndpointsRequestResourceNetworkEndpointGroupsDetachEndpointsRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

detachNetworkEndpointsCallable()

public final UnaryCallable<DetachNetworkEndpointsNetworkEndpointGroupRequest,Operation> detachNetworkEndpointsCallable()

Detach a list of network endpoints from the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   DetachNetworkEndpointsNetworkEndpointGroupRequest request =
       DetachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsDetachEndpointsRequestResource(
               NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   ApiFuture<Operation> future =
       networkEndpointGroupsClient.detachNetworkEndpointsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DetachNetworkEndpointsNetworkEndpointGroupRequest,Operation>

detachNetworkEndpointsOperationCallable()

public final OperationCallable<DetachNetworkEndpointsNetworkEndpointGroupRequest,Operation,Operation> detachNetworkEndpointsOperationCallable()

Detach a list of network endpoints from the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   DetachNetworkEndpointsNetworkEndpointGroupRequest request =
       DetachNetworkEndpointsNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsDetachEndpointsRequestResource(
               NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   OperationFuture
Returns
TypeDescription
OperationCallable<DetachNetworkEndpointsNetworkEndpointGroupRequest,Operation,Operation>

get(GetNetworkEndpointGroupRequest request)

public final NetworkEndpointGroup get(GetNetworkEndpointGroupRequest request)

Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   GetNetworkEndpointGroupRequest request =
       GetNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setProject("project-309310695")
           .setZone("zone3744684")
           .build();
   NetworkEndpointGroup response = networkEndpointGroupsClient.get(request);
 }
 
Parameter
NameDescription
requestGetNetworkEndpointGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
NetworkEndpointGroup

get(String project, String zone, String networkEndpointGroup)

public final NetworkEndpointGroup get(String project, String zone, String networkEndpointGroup)

Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   String networkEndpointGroup = "networkEndpointGroup-2120389028";
   NetworkEndpointGroup response =
       networkEndpointGroupsClient.get(project, zone, networkEndpointGroup);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone where the network endpoint group is located. It should comply with RFC1035.

networkEndpointGroupString

The name of the network endpoint group. It should comply with RFC1035.

Returns
TypeDescription
NetworkEndpointGroup

getCallable()

public final UnaryCallable<GetNetworkEndpointGroupRequest,NetworkEndpointGroup> getCallable()

Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   GetNetworkEndpointGroupRequest request =
       GetNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setProject("project-309310695")
           .setZone("zone3744684")
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<GetNetworkEndpointGroupRequest,NetworkEndpointGroup>

getSettings()

public final NetworkEndpointGroupsSettings getSettings()
Returns
TypeDescription
NetworkEndpointGroupsSettings

getStub()

public NetworkEndpointGroupsStub getStub()
Returns
TypeDescription
NetworkEndpointGroupsStub

insertAsync(InsertNetworkEndpointGroupRequest request)

public final OperationFuture<Operation,Operation> insertAsync(InsertNetworkEndpointGroupRequest request)

Creates a network endpoint group in the specified project using the parameters that are included in the request.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   InsertNetworkEndpointGroupRequest request =
       InsertNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   Operation response = networkEndpointGroupsClient.insertAsync(request).get();
 }
 
Parameter
NameDescription
requestInsertNetworkEndpointGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertAsync(String project, String zone, NetworkEndpointGroup networkEndpointGroupResource)

public final OperationFuture<Operation,Operation> insertAsync(String project, String zone, NetworkEndpointGroup networkEndpointGroupResource)

Creates a network endpoint group in the specified project using the parameters that are included in the request.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
   Operation response =
       networkEndpointGroupsClient
           .insertAsync(project, zone, networkEndpointGroupResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.

networkEndpointGroupResourceNetworkEndpointGroup

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertCallable()

public final UnaryCallable<InsertNetworkEndpointGroupRequest,Operation> insertCallable()

Creates a network endpoint group in the specified project using the parameters that are included in the request.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   InsertNetworkEndpointGroupRequest request =
       InsertNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   ApiFuture<Operation> future =
       networkEndpointGroupsClient.insertCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<InsertNetworkEndpointGroupRequest,Operation>

insertOperationCallable()

public final OperationCallable<InsertNetworkEndpointGroupRequest,Operation,Operation> insertOperationCallable()

Creates a network endpoint group in the specified project using the parameters that are included in the request.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   InsertNetworkEndpointGroupRequest request =
       InsertNetworkEndpointGroupRequest.newBuilder()
           .setNetworkEndpointGroupResource(NetworkEndpointGroup.newBuilder().build())
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setZone("zone3744684")
           .build();
   OperationFuture
Returns
TypeDescription
OperationCallable<InsertNetworkEndpointGroupRequest,Operation,Operation>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

list(ListNetworkEndpointGroupsRequest request)

public final NetworkEndpointGroupsClient.ListPagedResponse list(ListNetworkEndpointGroupsRequest request)

Retrieves the list of network endpoint groups that are located in the specified project and zone.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   ListNetworkEndpointGroupsRequest request =
       ListNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setZone("zone3744684")
           .build();
   for (NetworkEndpointGroup element : networkEndpointGroupsClient.list(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListNetworkEndpointGroupsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
NetworkEndpointGroupsClient.ListPagedResponse

list(String project, String zone)

public final NetworkEndpointGroupsClient.ListPagedResponse list(String project, String zone)

Retrieves the list of network endpoint groups that are located in the specified project and zone.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   for (NetworkEndpointGroup element :
       networkEndpointGroupsClient.list(project, zone).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone where the network endpoint group is located. It should comply with RFC1035.

Returns
TypeDescription
NetworkEndpointGroupsClient.ListPagedResponse

listCallable()

public final UnaryCallable<ListNetworkEndpointGroupsRequest,NetworkEndpointGroupList> listCallable()

Retrieves the list of network endpoint groups that are located in the specified project and zone.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   ListNetworkEndpointGroupsRequest request =
       ListNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setZone("zone3744684")
           .build();
   while (true) {
     NetworkEndpointGroupList response =
         networkEndpointGroupsClient.listCallable().call(request);
     for (NetworkEndpointGroup element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListNetworkEndpointGroupsRequest,NetworkEndpointGroupList>

listNetworkEndpoints(ListNetworkEndpointsNetworkEndpointGroupsRequest request)

public final NetworkEndpointGroupsClient.ListNetworkEndpointsPagedResponse listNetworkEndpoints(ListNetworkEndpointsNetworkEndpointGroupsRequest request)

Lists the network endpoints in the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   ListNetworkEndpointsNetworkEndpointGroupsRequest request =
       ListNetworkEndpointsNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsListEndpointsRequestResource(
               NetworkEndpointGroupsListEndpointsRequest.newBuilder().build())
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setZone("zone3744684")
           .build();
   for (NetworkEndpointWithHealthStatus element :
       networkEndpointGroupsClient.listNetworkEndpoints(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListNetworkEndpointsNetworkEndpointGroupsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
NetworkEndpointGroupsClient.ListNetworkEndpointsPagedResponse

listNetworkEndpoints(String project, String zone, String networkEndpointGroup, NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource)

public final NetworkEndpointGroupsClient.ListNetworkEndpointsPagedResponse listNetworkEndpoints(String project, String zone, String networkEndpointGroup, NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource)

Lists the network endpoints in the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   String networkEndpointGroup = "networkEndpointGroup-2120389028";
   NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource =
       NetworkEndpointGroupsListEndpointsRequest.newBuilder().build();
   for (NetworkEndpointWithHealthStatus element :
       networkEndpointGroupsClient
           .listNetworkEndpoints(
               project,
               zone,
               networkEndpointGroup,
               networkEndpointGroupsListEndpointsRequestResource)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone where the network endpoint group is located. It should comply with RFC1035.

networkEndpointGroupString

The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.

networkEndpointGroupsListEndpointsRequestResourceNetworkEndpointGroupsListEndpointsRequest

The body resource for this request

Returns
TypeDescription
NetworkEndpointGroupsClient.ListNetworkEndpointsPagedResponse

listNetworkEndpointsCallable()

public final UnaryCallable<ListNetworkEndpointsNetworkEndpointGroupsRequest,NetworkEndpointGroupsListNetworkEndpoints> listNetworkEndpointsCallable()

Lists the network endpoints in the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   ListNetworkEndpointsNetworkEndpointGroupsRequest request =
       ListNetworkEndpointsNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsListEndpointsRequestResource(
               NetworkEndpointGroupsListEndpointsRequest.newBuilder().build())
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setZone("zone3744684")
           .build();
   while (true) {
     NetworkEndpointGroupsListNetworkEndpoints response =
         networkEndpointGroupsClient.listNetworkEndpointsCallable().call(request);
     for (NetworkEndpointWithHealthStatus element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListNetworkEndpointsNetworkEndpointGroupsRequest,NetworkEndpointGroupsListNetworkEndpoints>

listNetworkEndpointsPagedCallable()

public final UnaryCallable<ListNetworkEndpointsNetworkEndpointGroupsRequest,NetworkEndpointGroupsClient.ListNetworkEndpointsPagedResponse> listNetworkEndpointsPagedCallable()

Lists the network endpoints in the specified network endpoint group.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   ListNetworkEndpointsNetworkEndpointGroupsRequest request =
       ListNetworkEndpointsNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setNetworkEndpointGroup("networkEndpointGroup-2120389028")
           .setNetworkEndpointGroupsListEndpointsRequestResource(
               NetworkEndpointGroupsListEndpointsRequest.newBuilder().build())
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setZone("zone3744684")
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<ListNetworkEndpointsNetworkEndpointGroupsRequest,ListNetworkEndpointsPagedResponse>

listPagedCallable()

public final UnaryCallable<ListNetworkEndpointGroupsRequest,NetworkEndpointGroupsClient.ListPagedResponse> listPagedCallable()

Retrieves the list of network endpoint groups that are located in the specified project and zone.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   ListNetworkEndpointGroupsRequest request =
       ListNetworkEndpointGroupsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setZone("zone3744684")
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<ListNetworkEndpointGroupsRequest,ListPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsNetworkEndpointGroupRequest request)

public final TestPermissionsResponse testIamPermissions(TestIamPermissionsNetworkEndpointGroupRequest request)

Returns permissions that a caller has on the specified resource.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   TestIamPermissionsNetworkEndpointGroupRequest request =
       TestIamPermissionsNetworkEndpointGroupRequest.newBuilder()
           .setProject("project-309310695")
           .setResource("resource-341064690")
           .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
           .setZone("zone3744684")
           .build();
   TestPermissionsResponse response = networkEndpointGroupsClient.testIamPermissions(request);
 }
 
Parameter
NameDescription
requestTestIamPermissionsNetworkEndpointGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TestPermissionsResponse

testIamPermissions(String project, String zone, String resource, TestPermissionsRequest testPermissionsRequestResource)

public final TestPermissionsResponse testIamPermissions(String project, String zone, String resource, TestPermissionsRequest testPermissionsRequestResource)

Returns permissions that a caller has on the specified resource.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   String project = "project-309310695";
   String zone = "zone3744684";
   String resource = "resource-341064690";
   TestPermissionsRequest testPermissionsRequestResource =
       TestPermissionsRequest.newBuilder().build();
   TestPermissionsResponse response =
       networkEndpointGroupsClient.testIamPermissions(
           project, zone, resource, testPermissionsRequestResource);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

Returns
TypeDescription
TestPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsNetworkEndpointGroupRequest,TestPermissionsResponse> testIamPermissionsCallable()

Returns permissions that a caller has on the specified resource.

Sample code:


 try (NetworkEndpointGroupsClient networkEndpointGroupsClient =
     NetworkEndpointGroupsClient.create()) {
   TestIamPermissionsNetworkEndpointGroupRequest request =
       TestIamPermissionsNetworkEndpointGroupRequest.newBuilder()
           .setProject("project-309310695")
           .setResource("resource-341064690")
           .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
           .setZone("zone3744684")
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<TestIamPermissionsNetworkEndpointGroupRequest,TestPermissionsResponse>