Class EdgeContainerClient (0.21.0)
Stay organized with collections
Save and categorize content based on your preferences.
- 0.75.0 (latest)
- 0.73.0
- 0.72.0
- 0.71.0
- 0.70.0
- 0.69.0
- 0.67.0
- 0.65.0
- 0.64.0
- 0.61.0
- 0.60.0
- 0.59.0
- 0.57.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
publicclass EdgeContainerClientimplementsBackgroundResourceService 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:
- 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 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.
Implements
BackgroundResourceInherited Members
Static Methods
create()
publicstaticfinalEdgeContainerClientcreate()Constructs an instance of EdgeContainerClient with default settings.
| Returns | |
|---|---|
| Type | Description |
EdgeContainerClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
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 |
settings |
EdgeContainerSettings |
| Returns | |
|---|---|
| Type | Description |
EdgeContainerClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
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 |
stub |
EdgeContainerStub |
| Returns | |
|---|---|
| Type | Description |
EdgeContainerClient |
|
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 |
settings |
EdgeContainerSettings |
EdgeContainerClient(EdgeContainerStub stub)
protectedEdgeContainerClient(EdgeContainerStubstub)| Parameter | |
|---|---|
| Name | Description |
stub |
EdgeContainerStub |
Methods
awaitTermination(long duration, TimeUnit unit)
publicbooleanawaitTermination(longduration,TimeUnitunit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
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 |
OperationFuture<Cluster,OperationMetadata> |
|
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 |
OperationFuture<Cluster,OperationMetadata> |
|
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 |
OperationFuture<Cluster,OperationMetadata> |
|
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 |
UnaryCallable<CreateClusterRequest,Operation> |
|
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 |
OperationCallable<CreateClusterRequest,Cluster,OperationMetadata> |
|
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 |
OperationFuture<NodePool,OperationMetadata> |
|
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 |
OperationFuture<NodePool,OperationMetadata> |
|
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 |
OperationFuture<NodePool,OperationMetadata> |
|
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 |
UnaryCallable<CreateNodePoolRequest,Operation> |
|
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 |
OperationCallable<CreateNodePoolRequest,NodePool,OperationMetadata> |
|
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 |
OperationFuture<VpnConnection,OperationMetadata> |
|
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 |
OperationFuture<VpnConnection,OperationMetadata> |
|
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 |
OperationFuture<VpnConnection,OperationMetadata> |
|
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 |
UnaryCallable<CreateVpnConnectionRequest,Operation> |
|
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 |
OperationCallable<CreateVpnConnectionRequest,VpnConnection,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
UnaryCallable<DeleteClusterRequest,Operation> |
|
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 |
OperationCallable<DeleteClusterRequest,Empty,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
UnaryCallable<DeleteNodePoolRequest,Operation> |
|
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 |
OperationCallable<DeleteNodePoolRequest,Empty,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
OperationFuture<Empty,OperationMetadata> |
|
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 |
UnaryCallable<DeleteVpnConnectionRequest,Operation> |
|
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 |
OperationCallable<DeleteVpnConnectionRequest,Empty,OperationMetadata> |
|
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 |
GenerateAccessTokenResponse |
|
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 |
GenerateAccessTokenResponse |
|
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 |
GenerateAccessTokenResponse |
|
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 |
UnaryCallable<GenerateAccessTokenRequest,GenerateAccessTokenResponse> |
|
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 |
Cluster |
|
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 |
Cluster |
|
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 |
Cluster |
|
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 |
UnaryCallable<GetClusterRequest,Cluster> |
|
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 |
OperationsClient |
|
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 |
Machine |
|
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 |
Machine |
|
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 |
Machine |
|
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 |
UnaryCallable<GetMachineRequest,Machine> |
|
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 |
NodePool |
|
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 |
NodePool |
|
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 |
NodePool |
|
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 |
UnaryCallable<GetNodePoolRequest,NodePool> |
|
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 |
OperationsClient |
|
getSettings()
publicfinalEdgeContainerSettingsgetSettings()| Returns | |
|---|---|
| Type | Description |
EdgeContainerSettings |
|
getStub()
publicEdgeContainerStubgetStub()| Returns | |
|---|---|
| Type | Description |
EdgeContainerStub |
|
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 |
VpnConnection |
|
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 |
VpnConnection |
|
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 |
VpnConnection |
|
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 |
UnaryCallable<GetVpnConnectionRequest,VpnConnection> |
|
isShutdown()
publicbooleanisShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
publicbooleanisTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
EdgeContainerClient.ListClustersPagedResponse |
|
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 |
EdgeContainerClient.ListClustersPagedResponse |
|
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 |
EdgeContainerClient.ListClustersPagedResponse |
|
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 |
UnaryCallable<ListClustersRequest,ListClustersResponse> |
|
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 |
UnaryCallable<ListClustersRequest,ListClustersPagedResponse> |
|
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 |
EdgeContainerClient.ListMachinesPagedResponse |
|
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 |
EdgeContainerClient.ListMachinesPagedResponse |
|
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 |
EdgeContainerClient.ListMachinesPagedResponse |
|
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 |
UnaryCallable<ListMachinesRequest,ListMachinesResponse> |
|
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 |
UnaryCallable<ListMachinesRequest,ListMachinesPagedResponse> |
|
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 |
EdgeContainerClient.ListNodePoolsPagedResponse |
|
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 |
EdgeContainerClient.ListNodePoolsPagedResponse |
|
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 |
EdgeContainerClient.ListNodePoolsPagedResponse |
|
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 |
UnaryCallable<ListNodePoolsRequest,ListNodePoolsResponse> |
|
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 |
UnaryCallable<ListNodePoolsRequest,ListNodePoolsPagedResponse> |
|
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 |
EdgeContainerClient.ListVpnConnectionsPagedResponse |
|
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 |
EdgeContainerClient.ListVpnConnectionsPagedResponse |
|
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 |
EdgeContainerClient.ListVpnConnectionsPagedResponse |
|
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 |
UnaryCallable<ListVpnConnectionsRequest,ListVpnConnectionsResponse> |
|
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 |
UnaryCallable<ListVpnConnectionsRequest,ListVpnConnectionsPagedResponse> |
|
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 |
OperationFuture<Cluster,OperationMetadata> |
|
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 |
OperationFuture<Cluster,OperationMetadata> |
|
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 |
UnaryCallable<UpdateClusterRequest,Operation> |
|
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 |
OperationCallable<UpdateClusterRequest,Cluster,OperationMetadata> |
|
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 |
OperationFuture<NodePool,OperationMetadata> |
|
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 |
OperationFuture<NodePool,OperationMetadata> |
|
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 |
UnaryCallable<UpdateNodePoolRequest,Operation> |
|
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 |
OperationCallable<UpdateNodePoolRequest,NodePool,OperationMetadata> |
|