- 1.63.0 (latest)
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
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:
- 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.
- 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.
- 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.
Implements
BackgroundResourceStatic Methods
create()
public static final NetworkEndpointGroupsClient create()
Constructs an instance of NetworkEndpointGroupsClient with default settings.
Type | Description |
NetworkEndpointGroupsClient |
Type | Description |
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.
Name | Description |
settings | NetworkEndpointGroupsSettings |
Type | Description |
NetworkEndpointGroupsClient |
Type | Description |
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).
Name | Description |
stub | NetworkEndpointGroupsStub |
Type | Description |
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.
Name | Description |
settings | NetworkEndpointGroupsSettings |
NetworkEndpointGroupsClient(NetworkEndpointGroupsStub stub)
protected NetworkEndpointGroupsClient(NetworkEndpointGroupsStub stub)
Name | Description |
stub | NetworkEndpointGroupsStub |
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
Name | Description |
request | AggregatedListNetworkEndpointGroupsRequest The request object containing all of the parameters for the API call. |
Type | Description |
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
Name | Description |
project | String Project ID for this request. |
Type | Description |
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
Type | Description |
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<>
Type | Description |
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();
}
Name | Description |
request | AttachNetworkEndpointsNetworkEndpointGroupRequest The request object containing all of the parameters for the API call. |
Type | Description |
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();
}
Name | Description |
project | String Project ID for this request. |
zone | String The name of the zone where the network endpoint group is located. It should comply with RFC1035. |
networkEndpointGroup | String The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035. |
networkEndpointGroupsAttachEndpointsRequestResource | NetworkEndpointGroupsAttachEndpointsRequest The body resource for this request |
Type | Description |
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();
}
Type | Description |
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
Type | Description |
OperationCallable<AttachNetworkEndpointsNetworkEndpointGroupRequest,Operation,Operation> |
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
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();
}
Name | Description |
request | DeleteNetworkEndpointGroupRequest The request object containing all of the parameters for the API call. |
Type | Description |
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();
}
Name | Description |
project | String Project ID for this request. |
zone | String The name of the zone where the network endpoint group is located. It should comply with RFC1035. |
networkEndpointGroup | String The name of the network endpoint group to delete. It should comply with RFC1035. |
Type | Description |
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();
}
Type | Description |
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
Type | Description |
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();
}
Name | Description |
request | DetachNetworkEndpointsNetworkEndpointGroupRequest The request object containing all of the parameters for the API call. |
Type | Description |
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();
}
Name | Description |
project | String Project ID for this request. |
zone | String The name of the zone where the network endpoint group is located. It should comply with RFC1035. |
networkEndpointGroup | String The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035. |
networkEndpointGroupsDetachEndpointsRequestResource | NetworkEndpointGroupsDetachEndpointsRequest The body resource for this request |
Type | Description |
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();
}
Type | Description |
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
Type | Description |
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);
}
Name | Description |
request | GetNetworkEndpointGroupRequest The request object containing all of the parameters for the API call. |
Type | Description |
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);
}
Name | Description |
project | String Project ID for this request. |
zone | String The name of the zone where the network endpoint group is located. It should comply with RFC1035. |
networkEndpointGroup | String The name of the network endpoint group. It should comply with RFC1035. |
Type | Description |
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
Type | Description |
UnaryCallable<GetNetworkEndpointGroupRequest,NetworkEndpointGroup> |
getSettings()
public final NetworkEndpointGroupsSettings getSettings()
Type | Description |
NetworkEndpointGroupsSettings |
getStub()
public NetworkEndpointGroupsStub getStub()
Type | Description |
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();
}
Name | Description |
request | InsertNetworkEndpointGroupRequest The request object containing all of the parameters for the API call. |
Type | Description |
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();
}
Name | Description |
project | String Project ID for this request. |
zone | String The name of the zone where you want to create the network endpoint group. It should comply with RFC1035. |
networkEndpointGroupResource | NetworkEndpointGroup The body resource for this request |
Type | Description |
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();
}
Type | Description |
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
Type | Description |
OperationCallable<InsertNetworkEndpointGroupRequest,Operation,Operation> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
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);
}
}
Name | Description |
request | ListNetworkEndpointGroupsRequest The request object containing all of the parameters for the API call. |
Type | Description |
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);
}
}
Name | Description |
project | String Project ID for this request. |
zone | String The name of the zone where the network endpoint group is located. It should comply with RFC1035. |
Type | Description |
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;
}
}
}
Type | Description |
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);
}
}
Name | Description |
request | ListNetworkEndpointsNetworkEndpointGroupsRequest The request object containing all of the parameters for the API call. |
Type | Description |
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);
}
}
Name | Description |
project | String Project ID for this request. |
zone | String The name of the zone where the network endpoint group is located. It should comply with RFC1035. |
networkEndpointGroup | String The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035. |
networkEndpointGroupsListEndpointsRequestResource | NetworkEndpointGroupsListEndpointsRequest The body resource for this request |
Type | Description |
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;
}
}
}
Type | Description |
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
Type | Description |
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
Type | Description |
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);
}
Name | Description |
request | TestIamPermissionsNetworkEndpointGroupRequest The request object containing all of the parameters for the API call. |
Type | Description |
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);
}
Name | Description |
project | String Project ID for this request. |
zone | String The name of the zone for this request. |
resource | String Name or id of the resource for this request. |
testPermissionsRequestResource | TestPermissionsRequest The body resource for this request |
Type | Description |
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
Type | Description |
UnaryCallable<TestIamPermissionsNetworkEndpointGroupRequest,TestPermissionsResponse> |