Class EdgeContainerClient (0.4.0)

publicclass EdgeContainerClientimplementsBackgroundResource

Service Description: EdgeContainer API provides management of Kubernetes Clusters on Google Edge Cloud deployments.

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:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ClusterNamename=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]");
Clusterresponse=edgeContainerClient.getCluster(name);
}

Note: close() needs to be called on the EdgeContainerClient 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 EdgeContainerSettings to create(). For example:

To customize credentials:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
EdgeContainerSettingsedgeContainerSettings=
EdgeContainerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
EdgeContainerClientedgeContainerClient=EdgeContainerClient.create(edgeContainerSettings);

To customize the endpoint:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
EdgeContainerSettingsedgeContainerSettings=
EdgeContainerSettings.newBuilder().setEndpoint(myEndpoint).build();
EdgeContainerClientedgeContainerClient=EdgeContainerClient.create(edgeContainerSettings);

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
EdgeContainerSettingsedgeContainerSettings=
EdgeContainerSettings.newHttpJsonBuilder().build();
EdgeContainerClientedgeContainerClient=EdgeContainerClient.create(edgeContainerSettings);

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

Inheritance

java.lang.Object > EdgeContainerClient

Implements

BackgroundResource

Static Methods

create()

publicstaticfinalEdgeContainerClientcreate()

Constructs an instance of EdgeContainerClient with default settings.

Returns
Type Description
Exceptions
Type Description

create(EdgeContainerSettings settings)

publicstaticfinalEdgeContainerClientcreate(EdgeContainerSettingssettings)

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

Parameter
Name Description
Returns
Type Description
Exceptions
Type Description

create(EdgeContainerStub stub)

publicstaticfinalEdgeContainerClientcreate(EdgeContainerStubstub)

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

Parameter
Name Description
Returns
Type Description

Constructors

EdgeContainerClient(EdgeContainerSettings settings)

protectedEdgeContainerClient(EdgeContainerSettingssettings)

Constructs an instance of EdgeContainerClient, 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
Name Description

EdgeContainerClient(EdgeContainerStub stub)

protectedEdgeContainerClient(EdgeContainerStubstub)
Parameter
Name Description

Methods

awaitTermination(long duration, TimeUnit unit)

publicbooleanawaitTermination(longduration,TimeUnitunit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
Exceptions
Type Description

close()

publicfinalvoidclose()

createClusterAsync(CreateClusterRequest request)

publicfinalOperationFuture<Cluster,OperationMetadata>createClusterAsync(CreateClusterRequestrequest)

Creates a new Cluster in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateClusterRequestrequest=
CreateClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Clusterresponse=edgeContainerClient.createClusterAsync(request).get();
}
Parameter
Name Description
request CreateClusterRequest

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

Returns
Type Description

createClusterAsync(LocationName parent, Cluster cluster, String clusterId)

publicfinalOperationFuture<Cluster,OperationMetadata>createClusterAsync(LocationNameparent,Clustercluster,StringclusterId)

Creates a new Cluster in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
Clustercluster=Cluster.newBuilder().build();
StringclusterId="clusterId561939637";
Clusterresponse=edgeContainerClient.createClusterAsync(parent,cluster,clusterId).get();
}
Parameters
Name Description
parent LocationName

Required. The parent location where this cluster will be created.

cluster Cluster

Required. The cluster to create.

clusterId String

Required. A client-specified unique identifier for the cluster.

Returns
Type Description

createClusterAsync(String parent, Cluster cluster, String clusterId)

publicfinalOperationFuture<Cluster,OperationMetadata>createClusterAsync(Stringparent,Clustercluster,StringclusterId)

Creates a new Cluster in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
Clustercluster=Cluster.newBuilder().build();
StringclusterId="clusterId561939637";
Clusterresponse=edgeContainerClient.createClusterAsync(parent,cluster,clusterId).get();
}
Parameters
Name Description
parent String

Required. The parent location where this cluster will be created.

cluster Cluster

Required. The cluster to create.

clusterId String

Required. A client-specified unique identifier for the cluster.

Returns
Type Description

createClusterCallable()

publicfinalUnaryCallable<CreateClusterRequest,Operation>createClusterCallable()

Creates a new Cluster in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateClusterRequestrequest=
CreateClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=edgeContainerClient.createClusterCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
Returns
Type Description

createClusterOperationCallable()

publicfinalOperationCallable<CreateClusterRequest,Cluster,OperationMetadata>createClusterOperationCallable()

Creates a new Cluster in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateClusterRequestrequest=
CreateClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Cluster,OperationMetadata>future=
edgeContainerClient.createClusterOperationCallable().futureCall(request);
// Do something.
Clusterresponse=future.get();
}
Returns
Type Description

createNodePoolAsync(ClusterName parent, NodePool nodePool, String nodePoolId)

publicfinalOperationFuture<NodePool,OperationMetadata>createNodePoolAsync(ClusterNameparent,NodePoolnodePool,StringnodePoolId)

Creates a new NodePool in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ClusterNameparent=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]");
NodePoolnodePool=NodePool.newBuilder().build();
StringnodePoolId="nodePoolId1121557241";
NodePoolresponse=
edgeContainerClient.createNodePoolAsync(parent,nodePool,nodePoolId).get();
}
Parameters
Name Description
parent ClusterName

Required. The parent cluster where this node pool will be created.

nodePool NodePool

Required. The node pool to create.

nodePoolId String

Required. A client-specified unique identifier for the node pool.

Returns
Type Description

createNodePoolAsync(CreateNodePoolRequest request)

publicfinalOperationFuture<NodePool,OperationMetadata>createNodePoolAsync(CreateNodePoolRequestrequest)

Creates a new NodePool in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateNodePoolRequestrequest=
CreateNodePoolRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setNodePoolId("nodePoolId1121557241")
.setNodePool(NodePool.newBuilder().build())
.setRequestId("requestId693933066")
.build();
NodePoolresponse=edgeContainerClient.createNodePoolAsync(request).get();
}
Parameter
Name Description
request CreateNodePoolRequest

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

Returns
Type Description

createNodePoolAsync(String parent, NodePool nodePool, String nodePoolId)

publicfinalOperationFuture<NodePool,OperationMetadata>createNodePoolAsync(Stringparent,NodePoolnodePool,StringnodePoolId)

Creates a new NodePool in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringparent=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString();
NodePoolnodePool=NodePool.newBuilder().build();
StringnodePoolId="nodePoolId1121557241";
NodePoolresponse=
edgeContainerClient.createNodePoolAsync(parent,nodePool,nodePoolId).get();
}
Parameters
Name Description
parent String

Required. The parent cluster where this node pool will be created.

nodePool NodePool

Required. The node pool to create.

nodePoolId String

Required. A client-specified unique identifier for the node pool.

Returns
Type Description

createNodePoolCallable()

publicfinalUnaryCallable<CreateNodePoolRequest,Operation>createNodePoolCallable()

Creates a new NodePool in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateNodePoolRequestrequest=
CreateNodePoolRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setNodePoolId("nodePoolId1121557241")
.setNodePool(NodePool.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=
edgeContainerClient.createNodePoolCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
Returns
Type Description

createNodePoolOperationCallable()

publicfinalOperationCallable<CreateNodePoolRequest,NodePool,OperationMetadata>createNodePoolOperationCallable()

Creates a new NodePool in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateNodePoolRequestrequest=
CreateNodePoolRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setNodePoolId("nodePoolId1121557241")
.setNodePool(NodePool.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<NodePool,OperationMetadata>future=
edgeContainerClient.createNodePoolOperationCallable().futureCall(request);
// Do something.
NodePoolresponse=future.get();
}
Returns
Type Description

createVpnConnectionAsync(CreateVpnConnectionRequest request)

publicfinalOperationFuture<VpnConnection,OperationMetadata>createVpnConnectionAsync(CreateVpnConnectionRequestrequest)

Creates a new VPN connection in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateVpnConnectionRequestrequest=
CreateVpnConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setVpnConnectionId("vpnConnectionId887330733")
.setVpnConnection(VpnConnection.newBuilder().build())
.setRequestId("requestId693933066")
.build();
VpnConnectionresponse=edgeContainerClient.createVpnConnectionAsync(request).get();
}
Parameter
Name Description
request CreateVpnConnectionRequest

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

Returns
Type Description

createVpnConnectionAsync(LocationName parent, VpnConnection vpnConnection, String vpnConnectionId)

publicfinalOperationFuture<VpnConnection,OperationMetadata>createVpnConnectionAsync(LocationNameparent,VpnConnectionvpnConnection,StringvpnConnectionId)

Creates a new VPN connection in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
VpnConnectionvpnConnection=VpnConnection.newBuilder().build();
StringvpnConnectionId="vpnConnectionId887330733";
VpnConnectionresponse=
edgeContainerClient
.createVpnConnectionAsync(parent,vpnConnection,vpnConnectionId)
.get();
}
Parameters
Name Description
parent LocationName

Required. The parent location where this vpn connection will be created.

vpnConnection VpnConnection

Required. The VPN connection to create.

vpnConnectionId String

Required. The VPN connection identifier.

Returns
Type Description

createVpnConnectionAsync(String parent, VpnConnection vpnConnection, String vpnConnectionId)

publicfinalOperationFuture<VpnConnection,OperationMetadata>createVpnConnectionAsync(Stringparent,VpnConnectionvpnConnection,StringvpnConnectionId)

Creates a new VPN connection in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
VpnConnectionvpnConnection=VpnConnection.newBuilder().build();
StringvpnConnectionId="vpnConnectionId887330733";
VpnConnectionresponse=
edgeContainerClient
.createVpnConnectionAsync(parent,vpnConnection,vpnConnectionId)
.get();
}
Parameters
Name Description
parent String

Required. The parent location where this vpn connection will be created.

vpnConnection VpnConnection

Required. The VPN connection to create.

vpnConnectionId String

Required. The VPN connection identifier.

Returns
Type Description

createVpnConnectionCallable()

publicfinalUnaryCallable<CreateVpnConnectionRequest,Operation>createVpnConnectionCallable()

Creates a new VPN connection in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateVpnConnectionRequestrequest=
CreateVpnConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setVpnConnectionId("vpnConnectionId887330733")
.setVpnConnection(VpnConnection.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=
edgeContainerClient.createVpnConnectionCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
Returns
Type Description

createVpnConnectionOperationCallable()

publicfinalOperationCallable<CreateVpnConnectionRequest,VpnConnection,OperationMetadata>createVpnConnectionOperationCallable()

Creates a new VPN connection in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
CreateVpnConnectionRequestrequest=
CreateVpnConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setVpnConnectionId("vpnConnectionId887330733")
.setVpnConnection(VpnConnection.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<VpnConnection,OperationMetadata>future=
edgeContainerClient.createVpnConnectionOperationCallable().futureCall(request);
// Do something.
VpnConnectionresponse=future.get();
}
Returns
Type Description

deleteClusterAsync(ClusterName name)

publicfinalOperationFuture<Empty,OperationMetadata>deleteClusterAsync(ClusterNamename)

Deletes a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ClusterNamename=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]");
edgeContainerClient.deleteClusterAsync(name).get();
}
Parameter
Name Description
name ClusterName

Required. The resource name of the cluster.

Returns
Type Description

deleteClusterAsync(DeleteClusterRequest request)

publicfinalOperationFuture<Empty,OperationMetadata>deleteClusterAsync(DeleteClusterRequestrequest)

Deletes a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteClusterRequestrequest=
DeleteClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setRequestId("requestId693933066")
.build();
edgeContainerClient.deleteClusterAsync(request).get();
}
Parameter
Name Description
request DeleteClusterRequest

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

Returns
Type Description

deleteClusterAsync(String name)

publicfinalOperationFuture<Empty,OperationMetadata>deleteClusterAsync(Stringname)

Deletes a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringname=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString();
edgeContainerClient.deleteClusterAsync(name).get();
}
Parameter
Name Description
name String

Required. The resource name of the cluster.

Returns
Type Description

deleteClusterCallable()

publicfinalUnaryCallable<DeleteClusterRequest,Operation>deleteClusterCallable()

Deletes a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteClusterRequestrequest=
DeleteClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=edgeContainerClient.deleteClusterCallable().futureCall(request);
// Do something.
future.get();
}
Returns
Type Description

deleteClusterOperationCallable()

publicfinalOperationCallable<DeleteClusterRequest,Empty,OperationMetadata>deleteClusterOperationCallable()

Deletes a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteClusterRequestrequest=
DeleteClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty,OperationMetadata>future=
edgeContainerClient.deleteClusterOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns
Type Description

deleteNodePoolAsync(DeleteNodePoolRequest request)

publicfinalOperationFuture<Empty,OperationMetadata>deleteNodePoolAsync(DeleteNodePoolRequestrequest)

Deletes a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteNodePoolRequestrequest=
DeleteNodePoolRequest.newBuilder()
.setName(
NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]").toString())
.setRequestId("requestId693933066")
.build();
edgeContainerClient.deleteNodePoolAsync(request).get();
}
Parameter
Name Description
request DeleteNodePoolRequest

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

Returns
Type Description

deleteNodePoolAsync(NodePoolName name)

publicfinalOperationFuture<Empty,OperationMetadata>deleteNodePoolAsync(NodePoolNamename)

Deletes a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
NodePoolNamename=NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]");
edgeContainerClient.deleteNodePoolAsync(name).get();
}
Parameter
Name Description
name NodePoolName

Required. The resource name of the node pool.

Returns
Type Description

deleteNodePoolAsync(String name)

publicfinalOperationFuture<Empty,OperationMetadata>deleteNodePoolAsync(Stringname)

Deletes a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringname=
NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]").toString();
edgeContainerClient.deleteNodePoolAsync(name).get();
}
Parameter
Name Description
name String

Required. The resource name of the node pool.

Returns
Type Description

deleteNodePoolCallable()

publicfinalUnaryCallable<DeleteNodePoolRequest,Operation>deleteNodePoolCallable()

Deletes a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteNodePoolRequestrequest=
DeleteNodePoolRequest.newBuilder()
.setName(
NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=
edgeContainerClient.deleteNodePoolCallable().futureCall(request);
// Do something.
future.get();
}
Returns
Type Description

deleteNodePoolOperationCallable()

publicfinalOperationCallable<DeleteNodePoolRequest,Empty,OperationMetadata>deleteNodePoolOperationCallable()

Deletes a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteNodePoolRequestrequest=
DeleteNodePoolRequest.newBuilder()
.setName(
NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty,OperationMetadata>future=
edgeContainerClient.deleteNodePoolOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns
Type Description

deleteVpnConnectionAsync(DeleteVpnConnectionRequest request)

publicfinalOperationFuture<Empty,OperationMetadata>deleteVpnConnectionAsync(DeleteVpnConnectionRequestrequest)

Deletes a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteVpnConnectionRequestrequest=
DeleteVpnConnectionRequest.newBuilder()
.setName(
VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]").toString())
.setRequestId("requestId693933066")
.build();
edgeContainerClient.deleteVpnConnectionAsync(request).get();
}
Parameter
Name Description
request DeleteVpnConnectionRequest

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

Returns
Type Description

deleteVpnConnectionAsync(VpnConnectionName name)

publicfinalOperationFuture<Empty,OperationMetadata>deleteVpnConnectionAsync(VpnConnectionNamename)

Deletes a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
VpnConnectionNamename=VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]");
edgeContainerClient.deleteVpnConnectionAsync(name).get();
}
Parameter
Name Description
name VpnConnectionName

Required. The resource name of the vpn connection.

Returns
Type Description

deleteVpnConnectionAsync(String name)

publicfinalOperationFuture<Empty,OperationMetadata>deleteVpnConnectionAsync(Stringname)

Deletes a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringname=VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]").toString();
edgeContainerClient.deleteVpnConnectionAsync(name).get();
}
Parameter
Name Description
name String

Required. The resource name of the vpn connection.

Returns
Type Description

deleteVpnConnectionCallable()

publicfinalUnaryCallable<DeleteVpnConnectionRequest,Operation>deleteVpnConnectionCallable()

Deletes a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteVpnConnectionRequestrequest=
DeleteVpnConnectionRequest.newBuilder()
.setName(
VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=
edgeContainerClient.deleteVpnConnectionCallable().futureCall(request);
// Do something.
future.get();
}
Returns
Type Description

deleteVpnConnectionOperationCallable()

publicfinalOperationCallable<DeleteVpnConnectionRequest,Empty,OperationMetadata>deleteVpnConnectionOperationCallable()

Deletes a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
DeleteVpnConnectionRequestrequest=
DeleteVpnConnectionRequest.newBuilder()
.setName(
VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty,OperationMetadata>future=
edgeContainerClient.deleteVpnConnectionOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns
Type Description

generateAccessToken(ClusterName cluster)

publicfinalGenerateAccessTokenResponsegenerateAccessToken(ClusterNamecluster)

Generates an access token for a Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ClusterNamecluster=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]");
GenerateAccessTokenResponseresponse=edgeContainerClient.generateAccessToken(cluster);
}
Parameter
Name Description
cluster ClusterName

Required. The resource name of the cluster.

Returns
Type Description

generateAccessToken(GenerateAccessTokenRequest request)

publicfinalGenerateAccessTokenResponsegenerateAccessToken(GenerateAccessTokenRequestrequest)

Generates an access token for a Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GenerateAccessTokenRequestrequest=
GenerateAccessTokenRequest.newBuilder()
.setCluster(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.build();
GenerateAccessTokenResponseresponse=edgeContainerClient.generateAccessToken(request);
}
Parameter
Name Description
request GenerateAccessTokenRequest

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

Returns
Type Description

generateAccessToken(String cluster)

publicfinalGenerateAccessTokenResponsegenerateAccessToken(Stringcluster)

Generates an access token for a Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringcluster=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString();
GenerateAccessTokenResponseresponse=edgeContainerClient.generateAccessToken(cluster);
}
Parameter
Name Description
cluster String

Required. The resource name of the cluster.

Returns
Type Description

generateAccessTokenCallable()

publicfinalUnaryCallable<GenerateAccessTokenRequest,GenerateAccessTokenResponse>generateAccessTokenCallable()

Generates an access token for a Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GenerateAccessTokenRequestrequest=
GenerateAccessTokenRequest.newBuilder()
.setCluster(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.build();
ApiFuture<GenerateAccessTokenResponse>future=
edgeContainerClient.generateAccessTokenCallable().futureCall(request);
// Do something.
GenerateAccessTokenResponseresponse=future.get();
}
Returns
Type Description

getCluster(ClusterName name)

publicfinalClustergetCluster(ClusterNamename)

Gets details of a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ClusterNamename=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]");
Clusterresponse=edgeContainerClient.getCluster(name);
}
Parameter
Name Description
name ClusterName

Required. The resource name of the cluster.

Returns
Type Description

getCluster(GetClusterRequest request)

publicfinalClustergetCluster(GetClusterRequestrequest)

Gets details of a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GetClusterRequestrequest=
GetClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.build();
Clusterresponse=edgeContainerClient.getCluster(request);
}
Parameter
Name Description
request GetClusterRequest

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

Returns
Type Description

getCluster(String name)

publicfinalClustergetCluster(Stringname)

Gets details of a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringname=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString();
Clusterresponse=edgeContainerClient.getCluster(name);
}
Parameter
Name Description
name String

Required. The resource name of the cluster.

Returns
Type Description

getClusterCallable()

publicfinalUnaryCallable<GetClusterRequest,Cluster>getClusterCallable()

Gets details of a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GetClusterRequestrequest=
GetClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.build();
ApiFuture<Cluster>future=edgeContainerClient.getClusterCallable().futureCall(request);
// Do something.
Clusterresponse=future.get();
}
Returns
Type Description

getHttpJsonOperationsClient()

publicfinalOperationsClientgetHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description

getMachine(GetMachineRequest request)

publicfinalMachinegetMachine(GetMachineRequestrequest)

Gets details of a single Machine.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GetMachineRequestrequest=
GetMachineRequest.newBuilder()
.setName(MachineName.of("[PROJECT]","[LOCATION]","[MACHINE]").toString())
.build();
Machineresponse=edgeContainerClient.getMachine(request);
}
Parameter
Name Description
request GetMachineRequest

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

Returns
Type Description

getMachine(MachineName name)

publicfinalMachinegetMachine(MachineNamename)

Gets details of a single Machine.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
MachineNamename=MachineName.of("[PROJECT]","[LOCATION]","[MACHINE]");
Machineresponse=edgeContainerClient.getMachine(name);
}
Parameter
Name Description
name MachineName

Required. The resource name of the machine.

Returns
Type Description

getMachine(String name)

publicfinalMachinegetMachine(Stringname)

Gets details of a single Machine.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringname=MachineName.of("[PROJECT]","[LOCATION]","[MACHINE]").toString();
Machineresponse=edgeContainerClient.getMachine(name);
}
Parameter
Name Description
name String

Required. The resource name of the machine.

Returns
Type Description

getMachineCallable()

publicfinalUnaryCallable<GetMachineRequest,Machine>getMachineCallable()

Gets details of a single Machine.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GetMachineRequestrequest=
GetMachineRequest.newBuilder()
.setName(MachineName.of("[PROJECT]","[LOCATION]","[MACHINE]").toString())
.build();
ApiFuture<Machine>future=edgeContainerClient.getMachineCallable().futureCall(request);
// Do something.
Machineresponse=future.get();
}
Returns
Type Description

getNodePool(GetNodePoolRequest request)

publicfinalNodePoolgetNodePool(GetNodePoolRequestrequest)

Gets details of a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GetNodePoolRequestrequest=
GetNodePoolRequest.newBuilder()
.setName(
NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]").toString())
.build();
NodePoolresponse=edgeContainerClient.getNodePool(request);
}
Parameter
Name Description
request GetNodePoolRequest

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

Returns
Type Description

getNodePool(NodePoolName name)

publicfinalNodePoolgetNodePool(NodePoolNamename)

Gets details of a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
NodePoolNamename=NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]");
NodePoolresponse=edgeContainerClient.getNodePool(name);
}
Parameter
Name Description
name NodePoolName

Required. The resource name of the node pool.

Returns
Type Description

getNodePool(String name)

publicfinalNodePoolgetNodePool(Stringname)

Gets details of a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringname=
NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]").toString();
NodePoolresponse=edgeContainerClient.getNodePool(name);
}
Parameter
Name Description
name String

Required. The resource name of the node pool.

Returns
Type Description

getNodePoolCallable()

publicfinalUnaryCallable<GetNodePoolRequest,NodePool>getNodePoolCallable()

Gets details of a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GetNodePoolRequestrequest=
GetNodePoolRequest.newBuilder()
.setName(
NodePoolName.of("[PROJECT]","[LOCATION]","[CLUSTER]","[NODE_POOL]").toString())
.build();
ApiFuture<NodePool>future=edgeContainerClient.getNodePoolCallable().futureCall(request);
// Do something.
NodePoolresponse=future.get();
}
Returns
Type Description

getOperationsClient()

publicfinalOperationsClientgetOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description

getSettings()

publicfinalEdgeContainerSettingsgetSettings()
Returns
Type Description

getStub()

publicEdgeContainerStubgetStub()
Returns
Type Description

getVpnConnection(GetVpnConnectionRequest request)

publicfinalVpnConnectiongetVpnConnection(GetVpnConnectionRequestrequest)

Gets details of a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GetVpnConnectionRequestrequest=
GetVpnConnectionRequest.newBuilder()
.setName(
VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]").toString())
.build();
VpnConnectionresponse=edgeContainerClient.getVpnConnection(request);
}
Parameter
Name Description
request GetVpnConnectionRequest

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

Returns
Type Description

getVpnConnection(VpnConnectionName name)

publicfinalVpnConnectiongetVpnConnection(VpnConnectionNamename)

Gets details of a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
VpnConnectionNamename=VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]");
VpnConnectionresponse=edgeContainerClient.getVpnConnection(name);
}
Parameter
Name Description
name VpnConnectionName

Required. The resource name of the vpn connection.

Returns
Type Description

getVpnConnection(String name)

publicfinalVpnConnectiongetVpnConnection(Stringname)

Gets details of a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringname=VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]").toString();
VpnConnectionresponse=edgeContainerClient.getVpnConnection(name);
}
Parameter
Name Description
name String

Required. The resource name of the vpn connection.

Returns
Type Description

getVpnConnectionCallable()

publicfinalUnaryCallable<GetVpnConnectionRequest,VpnConnection>getVpnConnectionCallable()

Gets details of a single VPN connection.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
GetVpnConnectionRequestrequest=
GetVpnConnectionRequest.newBuilder()
.setName(
VpnConnectionName.of("[PROJECT]","[LOCATION]","[VPN_CONNECTION]").toString())
.build();
ApiFuture<VpnConnection>future=
edgeContainerClient.getVpnConnectionCallable().futureCall(request);
// Do something.
VpnConnectionresponse=future.get();
}
Returns
Type Description

isShutdown()

publicbooleanisShutdown()
Returns
Type Description

isTerminated()

publicbooleanisTerminated()
Returns
Type Description

listClusters(ListClustersRequest request)

publicfinalEdgeContainerClient.ListClustersPagedResponselistClusters(ListClustersRequestrequest)

Lists Clusters in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListClustersRequestrequest=
ListClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(Clusterelement:edgeContainerClient.listClusters(request).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
request ListClustersRequest

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

Returns
Type Description

listClusters(LocationName parent)

publicfinalEdgeContainerClient.ListClustersPagedResponselistClusters(LocationNameparent)

Lists Clusters in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(Clusterelement:edgeContainerClient.listClusters(parent).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
parent LocationName

Required. The parent location, which owns this collection of clusters.

Returns
Type Description

listClusters(String parent)

publicfinalEdgeContainerClient.ListClustersPagedResponselistClusters(Stringparent)

Lists Clusters in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(Clusterelement:edgeContainerClient.listClusters(parent).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
parent String

Required. The parent location, which owns this collection of clusters.

Returns
Type Description

listClustersCallable()

publicfinalUnaryCallable<ListClustersRequest,ListClustersResponse>listClustersCallable()

Lists Clusters in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListClustersRequestrequest=
ListClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListClustersResponseresponse=edgeContainerClient.listClustersCallable().call(request);
for(Clusterelement:response.getClustersList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
Returns
Type Description

listClustersPagedCallable()

publicfinalUnaryCallable<ListClustersRequest,EdgeContainerClient.ListClustersPagedResponse>listClustersPagedCallable()

Lists Clusters in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListClustersRequestrequest=
ListClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Cluster>future=
edgeContainerClient.listClustersPagedCallable().futureCall(request);
// Do something.
for(Clusterelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
Returns
Type Description

listMachines(ListMachinesRequest request)

publicfinalEdgeContainerClient.ListMachinesPagedResponselistMachines(ListMachinesRequestrequest)

Lists Machines in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListMachinesRequestrequest=
ListMachinesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(Machineelement:edgeContainerClient.listMachines(request).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
request ListMachinesRequest

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

Returns
Type Description

listMachines(LocationName parent)

publicfinalEdgeContainerClient.ListMachinesPagedResponselistMachines(LocationNameparent)

Lists Machines in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(Machineelement:edgeContainerClient.listMachines(parent).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
parent LocationName

Required. The parent site, which owns this collection of machines.

Returns
Type Description

listMachines(String parent)

publicfinalEdgeContainerClient.ListMachinesPagedResponselistMachines(Stringparent)

Lists Machines in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(Machineelement:edgeContainerClient.listMachines(parent).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
parent String

Required. The parent site, which owns this collection of machines.

Returns
Type Description

listMachinesCallable()

publicfinalUnaryCallable<ListMachinesRequest,ListMachinesResponse>listMachinesCallable()

Lists Machines in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListMachinesRequestrequest=
ListMachinesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListMachinesResponseresponse=edgeContainerClient.listMachinesCallable().call(request);
for(Machineelement:response.getMachinesList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
Returns
Type Description

listMachinesPagedCallable()

publicfinalUnaryCallable<ListMachinesRequest,EdgeContainerClient.ListMachinesPagedResponse>listMachinesPagedCallable()

Lists Machines in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListMachinesRequestrequest=
ListMachinesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Machine>future=
edgeContainerClient.listMachinesPagedCallable().futureCall(request);
// Do something.
for(Machineelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
Returns
Type Description

listNodePools(ClusterName parent)

publicfinalEdgeContainerClient.ListNodePoolsPagedResponselistNodePools(ClusterNameparent)

Lists NodePools in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ClusterNameparent=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]");
for(NodePoolelement:edgeContainerClient.listNodePools(parent).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
parent ClusterName

Required. The parent cluster, which owns this collection of node pools.

Returns
Type Description

listNodePools(ListNodePoolsRequest request)

publicfinalEdgeContainerClient.ListNodePoolsPagedResponselistNodePools(ListNodePoolsRequestrequest)

Lists NodePools in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListNodePoolsRequestrequest=
ListNodePoolsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(NodePoolelement:edgeContainerClient.listNodePools(request).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
request ListNodePoolsRequest

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

Returns
Type Description

listNodePools(String parent)

publicfinalEdgeContainerClient.ListNodePoolsPagedResponselistNodePools(Stringparent)

Lists NodePools in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringparent=ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString();
for(NodePoolelement:edgeContainerClient.listNodePools(parent).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
parent String

Required. The parent cluster, which owns this collection of node pools.

Returns
Type Description

listNodePoolsCallable()

publicfinalUnaryCallable<ListNodePoolsRequest,ListNodePoolsResponse>listNodePoolsCallable()

Lists NodePools in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListNodePoolsRequestrequest=
ListNodePoolsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListNodePoolsResponseresponse=edgeContainerClient.listNodePoolsCallable().call(request);
for(NodePoolelement:response.getNodePoolsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
Returns
Type Description

listNodePoolsPagedCallable()

publicfinalUnaryCallable<ListNodePoolsRequest,EdgeContainerClient.ListNodePoolsPagedResponse>listNodePoolsPagedCallable()

Lists NodePools in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListNodePoolsRequestrequest=
ListNodePoolsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]","[LOCATION]","[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<NodePool>future=
edgeContainerClient.listNodePoolsPagedCallable().futureCall(request);
// Do something.
for(NodePoolelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
Returns
Type Description

listVpnConnections(ListVpnConnectionsRequest request)

publicfinalEdgeContainerClient.ListVpnConnectionsPagedResponselistVpnConnections(ListVpnConnectionsRequestrequest)

Lists VPN connections in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListVpnConnectionsRequestrequest=
ListVpnConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(VpnConnectionelement:edgeContainerClient.listVpnConnections(request).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
request ListVpnConnectionsRequest

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

Returns
Type Description

listVpnConnections(LocationName parent)

publicfinalEdgeContainerClient.ListVpnConnectionsPagedResponselistVpnConnections(LocationNameparent)

Lists VPN connections in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(VpnConnectionelement:edgeContainerClient.listVpnConnections(parent).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
parent LocationName

Required. The parent location, which owns this collection of VPN connections.

Returns
Type Description

listVpnConnections(String parent)

publicfinalEdgeContainerClient.ListVpnConnectionsPagedResponselistVpnConnections(Stringparent)

Lists VPN connections in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(VpnConnectionelement:edgeContainerClient.listVpnConnections(parent).iterateAll()){
// doThingsWith(element);
}
}
Parameter
Name Description
parent String

Required. The parent location, which owns this collection of VPN connections.

Returns
Type Description

listVpnConnectionsCallable()

publicfinalUnaryCallable<ListVpnConnectionsRequest,ListVpnConnectionsResponse>listVpnConnectionsCallable()

Lists VPN connections in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListVpnConnectionsRequestrequest=
ListVpnConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListVpnConnectionsResponseresponse=
edgeContainerClient.listVpnConnectionsCallable().call(request);
for(VpnConnectionelement:response.getVpnConnectionsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
Returns
Type Description

listVpnConnectionsPagedCallable()

publicfinalUnaryCallable<ListVpnConnectionsRequest,EdgeContainerClient.ListVpnConnectionsPagedResponse>listVpnConnectionsPagedCallable()

Lists VPN connections in a given project and location.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
ListVpnConnectionsRequestrequest=
ListVpnConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<VpnConnection>future=
edgeContainerClient.listVpnConnectionsPagedCallable().futureCall(request);
// Do something.
for(VpnConnectionelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
Returns
Type Description

shutdown()

publicvoidshutdown()

shutdownNow()

publicvoidshutdownNow()

updateClusterAsync(Cluster cluster, FieldMask updateMask)

publicfinalOperationFuture<Cluster,OperationMetadata>updateClusterAsync(Clustercluster,FieldMaskupdateMask)

Updates the parameters of a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
Clustercluster=Cluster.newBuilder().build();
FieldMaskupdateMask=FieldMask.newBuilder().build();
Clusterresponse=edgeContainerClient.updateClusterAsync(cluster,updateMask).get();
}
Parameters
Name Description
cluster Cluster

The updated cluster.

updateMask FieldMask

Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Returns
Type Description

updateClusterAsync(UpdateClusterRequest request)

publicfinalOperationFuture<Cluster,OperationMetadata>updateClusterAsync(UpdateClusterRequestrequest)

Updates the parameters of a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
UpdateClusterRequestrequest=
UpdateClusterRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Clusterresponse=edgeContainerClient.updateClusterAsync(request).get();
}
Parameter
Name Description
request UpdateClusterRequest

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

Returns
Type Description

updateClusterCallable()

publicfinalUnaryCallable<UpdateClusterRequest,Operation>updateClusterCallable()

Updates the parameters of a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
UpdateClusterRequestrequest=
UpdateClusterRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=edgeContainerClient.updateClusterCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
Returns
Type Description

updateClusterOperationCallable()

publicfinalOperationCallable<UpdateClusterRequest,Cluster,OperationMetadata>updateClusterOperationCallable()

Updates the parameters of a single Cluster.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
UpdateClusterRequestrequest=
UpdateClusterRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Cluster,OperationMetadata>future=
edgeContainerClient.updateClusterOperationCallable().futureCall(request);
// Do something.
Clusterresponse=future.get();
}
Returns
Type Description

updateNodePoolAsync(NodePool nodePool, FieldMask updateMask)

publicfinalOperationFuture<NodePool,OperationMetadata>updateNodePoolAsync(NodePoolnodePool,FieldMaskupdateMask)

Updates the parameters of a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
NodePoolnodePool=NodePool.newBuilder().build();
FieldMaskupdateMask=FieldMask.newBuilder().build();
NodePoolresponse=edgeContainerClient.updateNodePoolAsync(nodePool,updateMask).get();
}
Parameters
Name Description
nodePool NodePool

The updated node pool.

updateMask FieldMask

Field mask is used to specify the fields to be overwritten in the NodePool resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Returns
Type Description

updateNodePoolAsync(UpdateNodePoolRequest request)

publicfinalOperationFuture<NodePool,OperationMetadata>updateNodePoolAsync(UpdateNodePoolRequestrequest)

Updates the parameters of a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
UpdateNodePoolRequestrequest=
UpdateNodePoolRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setNodePool(NodePool.newBuilder().build())
.setRequestId("requestId693933066")
.build();
NodePoolresponse=edgeContainerClient.updateNodePoolAsync(request).get();
}
Parameter
Name Description
request UpdateNodePoolRequest

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

Returns
Type Description

updateNodePoolCallable()

publicfinalUnaryCallable<UpdateNodePoolRequest,Operation>updateNodePoolCallable()

Updates the parameters of a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
UpdateNodePoolRequestrequest=
UpdateNodePoolRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setNodePool(NodePool.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=
edgeContainerClient.updateNodePoolCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
Returns
Type Description

updateNodePoolOperationCallable()

publicfinalOperationCallable<UpdateNodePoolRequest,NodePool,OperationMetadata>updateNodePoolOperationCallable()

Updates the parameters of a single NodePool.

Sample code:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(EdgeContainerClientedgeContainerClient=EdgeContainerClient.create()){
UpdateNodePoolRequestrequest=
UpdateNodePoolRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setNodePool(NodePool.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<NodePool,OperationMetadata>future=
edgeContainerClient.updateNodePoolOperationCallable().futureCall(request);
// Do something.
NodePoolresponse=future.get();
}
Returns
Type Description

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.