Class EdgeContainerClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Cluster response = 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().
| Method | Description | Method Variants |
|---|---|---|
ListClusters |
Lists Clusters in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetCluster |
Gets details of a single Cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateCluster |
Creates a new Cluster in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateCluster |
Updates the parameters of a single Cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpgradeCluster |
Upgrades a single cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteCluster |
Deletes a single Cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GenerateAccessToken |
Generates an access token for a Cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GenerateOfflineCredential |
Generates an offline credential for a Cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListNodePools |
Lists NodePools in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetNodePool |
Gets details of a single NodePool. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateNodePool |
Creates a new NodePool in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateNodePool |
Updates the parameters of a single NodePool. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteNodePool |
Deletes a single NodePool. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMachines |
Lists Machines in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetMachine |
Gets details of a single Machine. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListVpnConnections |
Lists VPN connections in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetVpnConnection |
Gets details of a single VPN connection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateVpnConnection |
Creates a new VPN connection in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteVpnConnection |
Deletes a single VPN connection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetServerConfig |
Gets the server config. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return 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
EdgeContainerSettings edgeContainerSettings =
EdgeContainerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
EdgeContainerClient edgeContainerClient = 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
EdgeContainerSettings edgeContainerSettings =
EdgeContainerSettings.newBuilder().setEndpoint(myEndpoint).build();
EdgeContainerClient edgeContainerClient = 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
EdgeContainerSettings edgeContainerSettings =
EdgeContainerSettings.newHttpJsonBuilder().build();
EdgeContainerClient edgeContainerClient = EdgeContainerClient.create(edgeContainerSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEdgeContainerClient(EdgeContainerSettings settings) Constructs an instance of EdgeContainerClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final EdgeContainerClientcreate()Constructs an instance of EdgeContainerClient with default settings.static final EdgeContainerClientcreate(EdgeContainerSettings settings) Constructs an instance of EdgeContainerClient, using the given settings.static final EdgeContainerClientcreate(EdgeContainerStub stub) Constructs an instance of EdgeContainerClient, using the given stub for making calls.createClusterAsync(CreateClusterRequest request) Creates a new Cluster in a given project and location.createClusterAsync(LocationName parent, Cluster cluster, String clusterId) Creates a new Cluster in a given project and location.createClusterAsync(String parent, Cluster cluster, String clusterId) Creates a new Cluster in a given project and location.Creates a new Cluster in a given project and location.Creates a new Cluster in a given project and location.createNodePoolAsync(ClusterName parent, NodePool nodePool, String nodePoolId) Creates a new NodePool in a given project and location.createNodePoolAsync(CreateNodePoolRequest request) Creates a new NodePool in a given project and location.createNodePoolAsync(String parent, NodePool nodePool, String nodePoolId) Creates a new NodePool in a given project and location.Creates a new NodePool in a given project and location.Creates a new NodePool in a given project and location.Creates a new VPN connection in a given project and location.createVpnConnectionAsync(LocationName parent, VpnConnection vpnConnection, String vpnConnectionId) Creates a new VPN connection in a given project and location.createVpnConnectionAsync(String parent, VpnConnection vpnConnection, String vpnConnectionId) Creates a new VPN connection in a given project and location.Creates a new VPN connection in a given project and location.Creates a new VPN connection in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Cluster.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(DeleteClusterRequest request) Deletes a single Cluster.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(String name) Deletes a single Cluster.Deletes a single Cluster.final OperationCallable<DeleteClusterRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Cluster.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNodePoolAsync(DeleteNodePoolRequest request) Deletes a single NodePool.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single NodePool.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNodePoolAsync(String name) Deletes a single NodePool.Deletes a single NodePool.final OperationCallable<DeleteNodePoolRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single NodePool.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single VPN connection.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single VPN connection.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single VPN connection.Deletes a single VPN connection.final OperationCallable<DeleteVpnConnectionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single VPN connection.generateAccessToken(ClusterName cluster) Generates an access token for a Cluster.Generates an access token for a Cluster.generateAccessToken(String cluster) Generates an access token for a Cluster.Generates an access token for a Cluster.generateOfflineCredential(ClusterName cluster) Generates an offline credential for a Cluster.Generates an offline credential for a Cluster.generateOfflineCredential(String cluster) Generates an offline credential for a Cluster.Generates an offline credential for a Cluster.final ClustergetCluster(ClusterName name) Gets details of a single Cluster.final ClustergetCluster(GetClusterRequest request) Gets details of a single Cluster.final ClustergetCluster(String name) Gets details of a single Cluster.Gets details of a single Cluster.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final MachinegetMachine(GetMachineRequest request) Gets details of a single Machine.final MachinegetMachine(MachineName name) Gets details of a single Machine.final MachinegetMachine(String name) Gets details of a single Machine.Gets details of a single Machine.final NodePoolgetNodePool(GetNodePoolRequest request) Gets details of a single NodePool.final NodePoolgetNodePool(NodePoolName name) Gets details of a single NodePool.final NodePoolgetNodePool(String name) Gets details of a single NodePool.Gets details of a single NodePool.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final ServerConfiggetServerConfig(GetServerConfigRequest request) Gets the server config.final ServerConfiggetServerConfig(LocationName name) Gets the server config.final ServerConfiggetServerConfig(String name) Gets the server config.Gets the server config.final EdgeContainerSettingsgetStub()final VpnConnectiongetVpnConnection(GetVpnConnectionRequest request) Gets details of a single VPN connection.final VpnConnectionGets details of a single VPN connection.final VpnConnectiongetVpnConnection(String name) Gets details of a single VPN connection.Gets details of a single VPN connection.booleanbooleanlistClusters(ListClustersRequest request) Lists Clusters in a given project and location.listClusters(LocationName parent) Lists Clusters in a given project and location.listClusters(String parent) Lists Clusters in a given project and location.Lists Clusters in a given project and location.Lists Clusters in a given project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listMachines(ListMachinesRequest request) Lists Machines in a given project and location.listMachines(LocationName parent) Lists Machines in a given project and location.listMachines(String parent) Lists Machines in a given project and location.Lists Machines in a given project and location.Lists Machines in a given project and location.listNodePools(ClusterName parent) Lists NodePools in a given project and location.listNodePools(ListNodePoolsRequest request) Lists NodePools in a given project and location.listNodePools(String parent) Lists NodePools in a given project and location.Lists NodePools in a given project and location.Lists NodePools in a given project and location.Lists VPN connections in a given project and location.listVpnConnections(LocationName parent) Lists VPN connections in a given project and location.listVpnConnections(String parent) Lists VPN connections in a given project and location.Lists VPN connections in a given project and location.Lists VPN connections in a given project and location.voidshutdown()voidupdateClusterAsync(Cluster cluster, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Cluster.updateClusterAsync(UpdateClusterRequest request) Updates the parameters of a single Cluster.Updates the parameters of a single Cluster.Updates the parameters of a single Cluster.updateNodePoolAsync(NodePool nodePool, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single NodePool.updateNodePoolAsync(UpdateNodePoolRequest request) Updates the parameters of a single NodePool.Updates the parameters of a single NodePool.Updates the parameters of a single NodePool.upgradeClusterAsync(ClusterName name, String targetVersion, UpgradeClusterRequest.Schedule schedule) Upgrades a single cluster.upgradeClusterAsync(UpgradeClusterRequest request) Upgrades a single cluster.upgradeClusterAsync(String name, String targetVersion, UpgradeClusterRequest.Schedule schedule) Upgrades a single cluster.Upgrades a single cluster.Upgrades a single cluster.
-
Constructor Details
-
EdgeContainerClient
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.- Throws:
IOException
-
EdgeContainerClient
-
-
Method Details
-
create
Constructs an instance of EdgeContainerClient with default settings.- Throws:
IOException
-
create
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.- Throws:
IOException
-
create
Constructs an instance of EdgeContainerClient, using the given stub for making calls. This is for advanced usage - prefer using create(EdgeContainerSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listClusters
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Cluster element : edgeContainerClient.listClusters(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location, which owns this collection of clusters.- Throws:
ApiException- if the remote call fails
-
listClusters
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Cluster element : edgeContainerClient.listClusters(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location, which owns this collection of clusters.- Throws:
ApiException- if the remote call fails
-
listClusters
public final EdgeContainerClient.ListClustersPagedResponse listClusters(ListClustersRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListClustersRequest request = ListClustersRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Cluster element : edgeContainerClient.listClusters(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listClustersPagedCallable
public final UnaryCallable<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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListClustersRequest request = 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 (Cluster element : future.get().iterateAll()) { // doThingsWith(element); } } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListClustersRequest request = ListClustersRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListClustersResponse response = edgeContainerClient.listClustersCallable().call(request); for (Cluster element : response.getClustersList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getCluster
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); Cluster response = edgeContainerClient.getCluster(name); }- Parameters:
name- Required. The resource name of the cluster.- Throws:
ApiException- if the remote call fails
-
getCluster
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); Cluster response = edgeContainerClient.getCluster(name); }- Parameters:
name- Required. The resource name of the cluster.- Throws:
ApiException- if the remote call fails
-
getCluster
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetClusterRequest request = GetClusterRequest.newBuilder() .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .build(); Cluster response = edgeContainerClient.getCluster(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetClusterRequest request = GetClusterRequest.newBuilder() .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .build(); ApiFuture<Cluster> future = edgeContainerClient.getClusterCallable().futureCall(request); // Do something. Cluster response = future.get(); } -
createClusterAsync
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(LocationName parent, Cluster cluster, String clusterId) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Cluster cluster = Cluster.newBuilder().build(); String clusterId = "clusterId561939637"; Cluster response = edgeContainerClient.createClusterAsync(parent, cluster, clusterId).get(); }- Parameters:
parent- Required. The parent location where this cluster will be created.cluster- Required. The cluster to create.clusterId- Required. A client-specified unique identifier for the cluster.- Throws:
ApiException- if the remote call fails
-
createClusterAsync
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(String parent, Cluster cluster, String clusterId) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Cluster cluster = Cluster.newBuilder().build(); String clusterId = "clusterId561939637"; Cluster response = edgeContainerClient.createClusterAsync(parent, cluster, clusterId).get(); }- Parameters:
parent- Required. The parent location where this cluster will be created.cluster- Required. The cluster to create.clusterId- Required. A client-specified unique identifier for the cluster.- Throws:
ApiException- if the remote call fails
-
createClusterAsync
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(CreateClusterRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateClusterRequest request = CreateClusterRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setClusterId("clusterId561939637") .setCluster(Cluster.newBuilder().build()) .setRequestId("requestId693933066") .build(); Cluster response = edgeContainerClient.createClusterAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createClusterOperationCallable
public final OperationCallable<CreateClusterRequest,Cluster, createClusterOperationCallable()OperationMetadata> 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateClusterRequest request = 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. Cluster response = future.get(); } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateClusterRequest request = 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. Operation response = future.get(); } -
updateClusterAsync
public final OperationFuture<Cluster,OperationMetadata> updateClusterAsync(Cluster cluster, com.google.protobuf.FieldMask updateMask) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { Cluster cluster = Cluster.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Cluster response = edgeContainerClient.updateClusterAsync(cluster, updateMask).get(); }- Parameters:
cluster- The updated cluster.updateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateClusterAsync
public final OperationFuture<Cluster,OperationMetadata> updateClusterAsync(UpdateClusterRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpdateClusterRequest request = UpdateClusterRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setCluster(Cluster.newBuilder().build()) .setRequestId("requestId693933066") .build(); Cluster response = edgeContainerClient.updateClusterAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateClusterOperationCallable
public final OperationCallable<UpdateClusterRequest,Cluster, updateClusterOperationCallable()OperationMetadata> 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpdateClusterRequest request = UpdateClusterRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setCluster(Cluster.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Cluster, OperationMetadata> future = edgeContainerClient.updateClusterOperationCallable().futureCall(request); // Do something. Cluster response = future.get(); } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpdateClusterRequest request = UpdateClusterRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setCluster(Cluster.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeContainerClient.updateClusterCallable().futureCall(request); // Do something. Operation response = future.get(); } -
upgradeClusterAsync
public final OperationFuture<Cluster,OperationMetadata> upgradeClusterAsync(ClusterName name, String targetVersion, UpgradeClusterRequest.Schedule schedule) Upgrades 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); String targetVersion = "targetVersion-1639412217"; UpgradeClusterRequest.Schedule schedule = UpgradeClusterRequest.Schedule.forNumber(0); Cluster response = edgeContainerClient.upgradeClusterAsync(name, targetVersion, schedule).get(); }- Parameters:
name- Required. The resource name of the cluster.targetVersion- Required. The version the cluster is going to be upgraded to.schedule- The schedule for the upgrade.- Throws:
ApiException- if the remote call fails
-
upgradeClusterAsync
public final OperationFuture<Cluster,OperationMetadata> upgradeClusterAsync(String name, String targetVersion, UpgradeClusterRequest.Schedule schedule) Upgrades 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); String targetVersion = "targetVersion-1639412217"; UpgradeClusterRequest.Schedule schedule = UpgradeClusterRequest.Schedule.forNumber(0); Cluster response = edgeContainerClient.upgradeClusterAsync(name, targetVersion, schedule).get(); }- Parameters:
name- Required. The resource name of the cluster.targetVersion- Required. The version the cluster is going to be upgraded to.schedule- The schedule for the upgrade.- Throws:
ApiException- if the remote call fails
-
upgradeClusterAsync
public final OperationFuture<Cluster,OperationMetadata> upgradeClusterAsync(UpgradeClusterRequest request) Upgrades 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpgradeClusterRequest request = UpgradeClusterRequest.newBuilder() .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setTargetVersion("targetVersion-1639412217") .setRequestId("requestId693933066") .build(); Cluster response = edgeContainerClient.upgradeClusterAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
upgradeClusterOperationCallable
public final OperationCallable<UpgradeClusterRequest,Cluster, upgradeClusterOperationCallable()OperationMetadata> Upgrades 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpgradeClusterRequest request = UpgradeClusterRequest.newBuilder() .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setTargetVersion("targetVersion-1639412217") .setRequestId("requestId693933066") .build(); OperationFuture<Cluster, OperationMetadata> future = edgeContainerClient.upgradeClusterOperationCallable().futureCall(request); // Do something. Cluster response = future.get(); } -
upgradeClusterCallable
Upgrades 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpgradeClusterRequest request = UpgradeClusterRequest.newBuilder() .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setTargetVersion("targetVersion-1639412217") .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeContainerClient.upgradeClusterCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteClusterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(ClusterName name) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); edgeContainerClient.deleteClusterAsync(name).get(); }- Parameters:
name- Required. The resource name of the cluster.- Throws:
ApiException- if the remote call fails
-
deleteClusterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(String name) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); edgeContainerClient.deleteClusterAsync(name).get(); }- Parameters:
name- Required. The resource name of the cluster.- Throws:
ApiException- if the remote call fails
-
deleteClusterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(DeleteClusterRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteClusterRequest request = DeleteClusterRequest.newBuilder() .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setRequestId("requestId693933066") .build(); edgeContainerClient.deleteClusterAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteClusterOperationCallable
public final OperationCallable<DeleteClusterRequest,com.google.protobuf.Empty, deleteClusterOperationCallable()OperationMetadata> 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteClusterRequest request = DeleteClusterRequest.newBuilder() .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = edgeContainerClient.deleteClusterOperationCallable().futureCall(request); // Do something. future.get(); } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteClusterRequest request = DeleteClusterRequest.newBuilder() .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeContainerClient.deleteClusterCallable().futureCall(request); // Do something. future.get(); } -
generateAccessToken
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ClusterName cluster = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); GenerateAccessTokenResponse response = edgeContainerClient.generateAccessToken(cluster); }- Parameters:
cluster- Required. The resource name of the cluster.- Throws:
ApiException- if the remote call fails
-
generateAccessToken
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String cluster = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); GenerateAccessTokenResponse response = edgeContainerClient.generateAccessToken(cluster); }- Parameters:
cluster- Required. The resource name of the cluster.- Throws:
ApiException- if the remote call fails
-
generateAccessToken
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GenerateAccessTokenRequest request = GenerateAccessTokenRequest.newBuilder() .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .build(); GenerateAccessTokenResponse response = edgeContainerClient.generateAccessToken(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
generateAccessTokenCallable
public final UnaryCallable<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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GenerateAccessTokenRequest request = GenerateAccessTokenRequest.newBuilder() .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .build(); ApiFuture<GenerateAccessTokenResponse> future = edgeContainerClient.generateAccessTokenCallable().futureCall(request); // Do something. GenerateAccessTokenResponse response = future.get(); } -
generateOfflineCredential
Generates an offline credential 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ClusterName cluster = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); GenerateOfflineCredentialResponse response = edgeContainerClient.generateOfflineCredential(cluster); }- Parameters:
cluster- Required. The resource name of the cluster.- Throws:
ApiException- if the remote call fails
-
generateOfflineCredential
Generates an offline credential 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String cluster = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); GenerateOfflineCredentialResponse response = edgeContainerClient.generateOfflineCredential(cluster); }- Parameters:
cluster- Required. The resource name of the cluster.- Throws:
ApiException- if the remote call fails
-
generateOfflineCredential
public final GenerateOfflineCredentialResponse generateOfflineCredential(GenerateOfflineCredentialRequest request) Generates an offline credential 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GenerateOfflineCredentialRequest request = GenerateOfflineCredentialRequest.newBuilder() .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .build(); GenerateOfflineCredentialResponse response = edgeContainerClient.generateOfflineCredential(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
generateOfflineCredentialCallable
public final UnaryCallable<GenerateOfflineCredentialRequest,GenerateOfflineCredentialResponse> generateOfflineCredentialCallable()Generates an offline credential 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GenerateOfflineCredentialRequest request = GenerateOfflineCredentialRequest.newBuilder() .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .build(); ApiFuture<GenerateOfflineCredentialResponse> future = edgeContainerClient.generateOfflineCredentialCallable().futureCall(request); // Do something. GenerateOfflineCredentialResponse response = future.get(); } -
listNodePools
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); for (NodePool element : edgeContainerClient.listNodePools(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent cluster, which owns this collection of node pools.- Throws:
ApiException- if the remote call fails
-
listNodePools
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); for (NodePool element : edgeContainerClient.listNodePools(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent cluster, which owns this collection of node pools.- Throws:
ApiException- if the remote call fails
-
listNodePools
public final EdgeContainerClient.ListNodePoolsPagedResponse listNodePools(ListNodePoolsRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListNodePoolsRequest request = ListNodePoolsRequest.newBuilder() .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (NodePool element : edgeContainerClient.listNodePools(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listNodePoolsPagedCallable
public final UnaryCallable<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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListNodePoolsRequest request = 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 (NodePool element : future.get().iterateAll()) { // doThingsWith(element); } } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListNodePoolsRequest request = ListNodePoolsRequest.newBuilder() .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListNodePoolsResponse response = edgeContainerClient.listNodePoolsCallable().call(request); for (NodePool element : response.getNodePoolsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getNodePool
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { NodePoolName name = NodePoolName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[NODE_POOL]"); NodePool response = edgeContainerClient.getNodePool(name); }- Parameters:
name- Required. The resource name of the node pool.- Throws:
ApiException- if the remote call fails
-
getNodePool
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = NodePoolName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[NODE_POOL]").toString(); NodePool response = edgeContainerClient.getNodePool(name); }- Parameters:
name- Required. The resource name of the node pool.- Throws:
ApiException- if the remote call fails
-
getNodePool
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetNodePoolRequest request = GetNodePoolRequest.newBuilder() .setName( NodePoolName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[NODE_POOL]").toString()) .build(); NodePool response = edgeContainerClient.getNodePool(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetNodePoolRequest request = GetNodePoolRequest.newBuilder() .setName( NodePoolName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[NODE_POOL]").toString()) .build(); ApiFuture<NodePool> future = edgeContainerClient.getNodePoolCallable().futureCall(request); // Do something. NodePool response = future.get(); } -
createNodePoolAsync
public final OperationFuture<NodePool,OperationMetadata> createNodePoolAsync(ClusterName parent, NodePool nodePool, String nodePoolId) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); NodePool nodePool = NodePool.newBuilder().build(); String nodePoolId = "nodePoolId1121557241"; NodePool response = edgeContainerClient.createNodePoolAsync(parent, nodePool, nodePoolId).get(); }- Parameters:
parent- Required. The parent cluster where this node pool will be created.nodePool- Required. The node pool to create.nodePoolId- Required. A client-specified unique identifier for the node pool.- Throws:
ApiException- if the remote call fails
-
createNodePoolAsync
public final OperationFuture<NodePool,OperationMetadata> createNodePoolAsync(String parent, NodePool nodePool, String nodePoolId) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); NodePool nodePool = NodePool.newBuilder().build(); String nodePoolId = "nodePoolId1121557241"; NodePool response = edgeContainerClient.createNodePoolAsync(parent, nodePool, nodePoolId).get(); }- Parameters:
parent- Required. The parent cluster where this node pool will be created.nodePool- Required. The node pool to create.nodePoolId- Required. A client-specified unique identifier for the node pool.- Throws:
ApiException- if the remote call fails
-
createNodePoolAsync
public final OperationFuture<NodePool,OperationMetadata> createNodePoolAsync(CreateNodePoolRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateNodePoolRequest request = CreateNodePoolRequest.newBuilder() .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) .setNodePoolId("nodePoolId1121557241") .setNodePool(NodePool.newBuilder().build()) .setRequestId("requestId693933066") .build(); NodePool response = edgeContainerClient.createNodePoolAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createNodePoolOperationCallable
public final OperationCallable<CreateNodePoolRequest,NodePool, createNodePoolOperationCallable()OperationMetadata> 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateNodePoolRequest request = 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. NodePool response = future.get(); } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateNodePoolRequest request = 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. Operation response = future.get(); } -
updateNodePoolAsync
public final OperationFuture<NodePool,OperationMetadata> updateNodePoolAsync(NodePool nodePool, com.google.protobuf.FieldMask updateMask) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { NodePool nodePool = NodePool.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); NodePool response = edgeContainerClient.updateNodePoolAsync(nodePool, updateMask).get(); }- Parameters:
nodePool- The updated node pool.updateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateNodePoolAsync
public final OperationFuture<NodePool,OperationMetadata> updateNodePoolAsync(UpdateNodePoolRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpdateNodePoolRequest request = UpdateNodePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setNodePool(NodePool.newBuilder().build()) .setRequestId("requestId693933066") .build(); NodePool response = edgeContainerClient.updateNodePoolAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateNodePoolOperationCallable
public final OperationCallable<UpdateNodePoolRequest,NodePool, updateNodePoolOperationCallable()OperationMetadata> 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpdateNodePoolRequest request = UpdateNodePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setNodePool(NodePool.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<NodePool, OperationMetadata> future = edgeContainerClient.updateNodePoolOperationCallable().futureCall(request); // Do something. NodePool response = future.get(); } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { UpdateNodePoolRequest request = UpdateNodePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setNodePool(NodePool.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeContainerClient.updateNodePoolCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteNodePoolAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNodePoolAsync(NodePoolName name) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { NodePoolName name = NodePoolName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[NODE_POOL]"); edgeContainerClient.deleteNodePoolAsync(name).get(); }- Parameters:
name- Required. The resource name of the node pool.- Throws:
ApiException- if the remote call fails
-
deleteNodePoolAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNodePoolAsync(String name) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = NodePoolName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[NODE_POOL]").toString(); edgeContainerClient.deleteNodePoolAsync(name).get(); }- Parameters:
name- Required. The resource name of the node pool.- Throws:
ApiException- if the remote call fails
-
deleteNodePoolAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNodePoolAsync(DeleteNodePoolRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteNodePoolRequest request = DeleteNodePoolRequest.newBuilder() .setName( NodePoolName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[NODE_POOL]").toString()) .setRequestId("requestId693933066") .build(); edgeContainerClient.deleteNodePoolAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteNodePoolOperationCallable
public final OperationCallable<DeleteNodePoolRequest,com.google.protobuf.Empty, deleteNodePoolOperationCallable()OperationMetadata> 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteNodePoolRequest request = 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(); } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteNodePoolRequest request = 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(); } -
listMachines
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Machine element : edgeContainerClient.listMachines(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent site, which owns this collection of machines.- Throws:
ApiException- if the remote call fails
-
listMachines
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Machine element : edgeContainerClient.listMachines(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent site, which owns this collection of machines.- Throws:
ApiException- if the remote call fails
-
listMachines
public final EdgeContainerClient.ListMachinesPagedResponse listMachines(ListMachinesRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListMachinesRequest request = ListMachinesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Machine element : edgeContainerClient.listMachines(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listMachinesPagedCallable
public final UnaryCallable<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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListMachinesRequest request = 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 (Machine element : future.get().iterateAll()) { // doThingsWith(element); } } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListMachinesRequest request = ListMachinesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListMachinesResponse response = edgeContainerClient.listMachinesCallable().call(request); for (Machine element : response.getMachinesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getMachine
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { MachineName name = MachineName.of("[PROJECT]", "[LOCATION]", "[MACHINE]"); Machine response = edgeContainerClient.getMachine(name); }- Parameters:
name- Required. The resource name of the machine.- Throws:
ApiException- if the remote call fails
-
getMachine
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = MachineName.of("[PROJECT]", "[LOCATION]", "[MACHINE]").toString(); Machine response = edgeContainerClient.getMachine(name); }- Parameters:
name- Required. The resource name of the machine.- Throws:
ApiException- if the remote call fails
-
getMachine
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetMachineRequest request = GetMachineRequest.newBuilder() .setName(MachineName.of("[PROJECT]", "[LOCATION]", "[MACHINE]").toString()) .build(); Machine response = edgeContainerClient.getMachine(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetMachineRequest request = GetMachineRequest.newBuilder() .setName(MachineName.of("[PROJECT]", "[LOCATION]", "[MACHINE]").toString()) .build(); ApiFuture<Machine> future = edgeContainerClient.getMachineCallable().futureCall(request); // Do something. Machine response = future.get(); } -
listVpnConnections
public final EdgeContainerClient.ListVpnConnectionsPagedResponse listVpnConnections(LocationName parent) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (VpnConnection element : edgeContainerClient.listVpnConnections(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location, which owns this collection of VPN connections.- Throws:
ApiException- if the remote call fails
-
listVpnConnections
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (VpnConnection element : edgeContainerClient.listVpnConnections(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location, which owns this collection of VPN connections.- Throws:
ApiException- if the remote call fails
-
listVpnConnections
public final EdgeContainerClient.ListVpnConnectionsPagedResponse listVpnConnections(ListVpnConnectionsRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListVpnConnectionsRequest request = ListVpnConnectionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (VpnConnection element : edgeContainerClient.listVpnConnections(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listVpnConnectionsPagedCallable
public final UnaryCallable<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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListVpnConnectionsRequest request = 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 (VpnConnection element : future.get().iterateAll()) { // doThingsWith(element); } } -
listVpnConnectionsCallable
public final UnaryCallable<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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListVpnConnectionsRequest request = ListVpnConnectionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListVpnConnectionsResponse response = edgeContainerClient.listVpnConnectionsCallable().call(request); for (VpnConnection element : response.getVpnConnectionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getVpnConnection
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { VpnConnectionName name = VpnConnectionName.of("[PROJECT]", "[LOCATION]", "[VPN_CONNECTION]"); VpnConnection response = edgeContainerClient.getVpnConnection(name); }- Parameters:
name- Required. The resource name of the vpn connection.- Throws:
ApiException- if the remote call fails
-
getVpnConnection
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = VpnConnectionName.of("[PROJECT]", "[LOCATION]", "[VPN_CONNECTION]").toString(); VpnConnection response = edgeContainerClient.getVpnConnection(name); }- Parameters:
name- Required. The resource name of the vpn connection.- Throws:
ApiException- if the remote call fails
-
getVpnConnection
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetVpnConnectionRequest request = GetVpnConnectionRequest.newBuilder() .setName( VpnConnectionName.of("[PROJECT]", "[LOCATION]", "[VPN_CONNECTION]").toString()) .build(); VpnConnection response = edgeContainerClient.getVpnConnection(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetVpnConnectionRequest request = GetVpnConnectionRequest.newBuilder() .setName( VpnConnectionName.of("[PROJECT]", "[LOCATION]", "[VPN_CONNECTION]").toString()) .build(); ApiFuture<VpnConnection> future = edgeContainerClient.getVpnConnectionCallable().futureCall(request); // Do something. VpnConnection response = future.get(); } -
createVpnConnectionAsync
public final OperationFuture<VpnConnection,OperationMetadata> createVpnConnectionAsync(LocationName parent, VpnConnection vpnConnection, String vpnConnectionId) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); VpnConnection vpnConnection = VpnConnection.newBuilder().build(); String vpnConnectionId = "vpnConnectionId887330733"; VpnConnection response = edgeContainerClient .createVpnConnectionAsync(parent, vpnConnection, vpnConnectionId) .get(); }- Parameters:
parent- Required. The parent location where this vpn connection will be created.vpnConnection- Required. The VPN connection to create.vpnConnectionId- Required. The VPN connection identifier.- Throws:
ApiException- if the remote call fails
-
createVpnConnectionAsync
public final OperationFuture<VpnConnection,OperationMetadata> createVpnConnectionAsync(String parent, VpnConnection vpnConnection, String vpnConnectionId) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); VpnConnection vpnConnection = VpnConnection.newBuilder().build(); String vpnConnectionId = "vpnConnectionId887330733"; VpnConnection response = edgeContainerClient .createVpnConnectionAsync(parent, vpnConnection, vpnConnectionId) .get(); }- Parameters:
parent- Required. The parent location where this vpn connection will be created.vpnConnection- Required. The VPN connection to create.vpnConnectionId- Required. The VPN connection identifier.- Throws:
ApiException- if the remote call fails
-
createVpnConnectionAsync
public final OperationFuture<VpnConnection,OperationMetadata> createVpnConnectionAsync(CreateVpnConnectionRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateVpnConnectionRequest request = CreateVpnConnectionRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setVpnConnectionId("vpnConnectionId887330733") .setVpnConnection(VpnConnection.newBuilder().build()) .setRequestId("requestId693933066") .build(); VpnConnection response = edgeContainerClient.createVpnConnectionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createVpnConnectionOperationCallable
public final OperationCallable<CreateVpnConnectionRequest,VpnConnection, createVpnConnectionOperationCallable()OperationMetadata> 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateVpnConnectionRequest request = 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. VpnConnection response = future.get(); } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { CreateVpnConnectionRequest request = 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. Operation response = future.get(); } -
deleteVpnConnectionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVpnConnectionAsync(VpnConnectionName name) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { VpnConnectionName name = VpnConnectionName.of("[PROJECT]", "[LOCATION]", "[VPN_CONNECTION]"); edgeContainerClient.deleteVpnConnectionAsync(name).get(); }- Parameters:
name- Required. The resource name of the vpn connection.- Throws:
ApiException- if the remote call fails
-
deleteVpnConnectionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVpnConnectionAsync(String name) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = VpnConnectionName.of("[PROJECT]", "[LOCATION]", "[VPN_CONNECTION]").toString(); edgeContainerClient.deleteVpnConnectionAsync(name).get(); }- Parameters:
name- Required. The resource name of the vpn connection.- Throws:
ApiException- if the remote call fails
-
deleteVpnConnectionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVpnConnectionAsync(DeleteVpnConnectionRequest request) 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteVpnConnectionRequest request = DeleteVpnConnectionRequest.newBuilder() .setName( VpnConnectionName.of("[PROJECT]", "[LOCATION]", "[VPN_CONNECTION]").toString()) .setRequestId("requestId693933066") .build(); edgeContainerClient.deleteVpnConnectionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteVpnConnectionOperationCallable
public final OperationCallable<DeleteVpnConnectionRequest,com.google.protobuf.Empty, deleteVpnConnectionOperationCallable()OperationMetadata> 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteVpnConnectionRequest request = 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(); } -
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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { DeleteVpnConnectionRequest request = DeleteVpnConnectionRequest.newBuilder() .setName( VpnConnectionName.of("[PROJECT]", "[LOCATION]", "[VPN_CONNECTION]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeContainerClient.deleteVpnConnectionCallable().futureCall(request); // Do something. future.get(); } -
getServerConfig
Gets the server config.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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { LocationName name = LocationName.of("[PROJECT]", "[LOCATION]"); ServerConfig response = edgeContainerClient.getServerConfig(name); }- Parameters:
name- Required. The name (project and location) of the server config to get, specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
getServerConfig
Gets the server config.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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { String name = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ServerConfig response = edgeContainerClient.getServerConfig(name); }- Parameters:
name- Required. The name (project and location) of the server config to get, specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
getServerConfig
Gets the server config.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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetServerConfigRequest request = GetServerConfigRequest.newBuilder() .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .build(); ServerConfig response = edgeContainerClient.getServerConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getServerConfigCallable
Gets the server config.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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetServerConfigRequest request = GetServerConfigRequest.newBuilder() .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .build(); ApiFuture<ServerConfig> future = edgeContainerClient.getServerConfigCallable().futureCall(request); // Do something. ServerConfig response = future.get(); } -
listLocations
public final EdgeContainerClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : edgeContainerClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,EdgeContainerClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = edgeContainerClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = edgeContainerClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = edgeContainerClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a 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 (EdgeContainerClient edgeContainerClient = EdgeContainerClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = edgeContainerClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-