- 2.54.0 (latest)
- 2.52.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.40.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.2
- 2.4.1
- 2.3.8
public class ClusterManagerClient implements BackgroundResource
Service Description: Google Kubernetes Engine Cluster Manager v1
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 for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String parent = "parent-995424086";
ListClustersResponse response = clusterManagerClient.listClusters(parent);
}
Note: close() needs to be called on the ClusterManagerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of ClusterManagerSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
ClusterManagerSettings clusterManagerSettings =
ClusterManagerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings);
To customize the endpoint:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
ClusterManagerSettings clusterManagerSettings =
ClusterManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final ClusterManagerClient create()
Constructs an instance of ClusterManagerClient with default settings.
Type | Description |
ClusterManagerClient |
Type | Description |
IOException |
create(ClusterManagerSettings settings)
public static final ClusterManagerClient create(ClusterManagerSettings settings)
Constructs an instance of ClusterManagerClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | ClusterManagerSettings |
Type | Description |
ClusterManagerClient |
Type | Description |
IOException |
create(ClusterManagerStub stub)
public static final ClusterManagerClient create(ClusterManagerStub stub)
Constructs an instance of ClusterManagerClient, using the given stub for making calls. This is for advanced usage - prefer using create(ClusterManagerSettings).
Name | Description |
stub | ClusterManagerStub |
Type | Description |
ClusterManagerClient |
Constructors
ClusterManagerClient(ClusterManagerSettings settings)
protected ClusterManagerClient(ClusterManagerSettings settings)
Constructs an instance of ClusterManagerClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Name | Description |
settings | ClusterManagerSettings |
ClusterManagerClient(ClusterManagerStub stub)
protected ClusterManagerClient(ClusterManagerStub stub)
Name | Description |
stub | ClusterManagerStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
cancelOperation(CancelOperationRequest request)
public final void cancelOperation(CancelOperationRequest request)
Cancels the specified operation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CancelOperationRequest request =
CancelOperationRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setOperationId("operationId129704162")
.setName("name3373707")
.build();
clusterManagerClient.cancelOperation(request);
}
Name | Description |
request | CancelOperationRequest The request object containing all of the parameters for the API call. |
cancelOperation(String name)
public final void cancelOperation(String name)
Cancels the specified operation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String name = "name3373707";
clusterManagerClient.cancelOperation(name);
}
Name | Description |
name | String The name (project, location, operation id) of the operation to cancel. Specified in
the format |
cancelOperation(String projectId, String zone, String operationId)
public final void cancelOperation(String projectId, String zone, String operationId)
Cancels the specified operation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
String operationId = "operationId129704162";
clusterManagerClient.cancelOperation(projectId, zone, operationId);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the operation resides. This field has been deprecated and replaced by the name field. |
operationId | String Deprecated. The server-assigned |
cancelOperationCallable()
public final UnaryCallable<CancelOperationRequest,Empty> cancelOperationCallable()
Cancels the specified operation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CancelOperationRequest request =
CancelOperationRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setOperationId("operationId129704162")
.setName("name3373707")
.build();
ApiFuture<Empty> future = clusterManagerClient.cancelOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<CancelOperationRequest,Empty> |
close()
public final void close()
completeIPRotation(CompleteIPRotationRequest request)
public final Operation completeIPRotation(CompleteIPRotationRequest request)
Completes master IP rotation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CompleteIPRotationRequest request =
CompleteIPRotationRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setName("name3373707")
.build();
Operation response = clusterManagerClient.completeIPRotation(request);
}
Name | Description |
request | CompleteIPRotationRequest The request object containing all of the parameters for the API call. |
Type | Description |
Operation |
completeIPRotation(String name)
public final Operation completeIPRotation(String name)
Completes master IP rotation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String name = "name3373707";
Operation response = clusterManagerClient.completeIPRotation(name);
}
Name | Description |
name | String The name (project, location, cluster name) of the cluster to complete IP rotation.
Specified in the format |
Type | Description |
Operation |
completeIPRotation(String projectId, String zone, String clusterId)
public final Operation completeIPRotation(String projectId, String zone, String clusterId)
Completes master IP rotation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
String clusterId = "clusterId561939637";
Operation response = clusterManagerClient.completeIPRotation(projectId, zone, clusterId);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field. |
clusterId | String Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. |
Type | Description |
Operation |
completeIPRotationCallable()
public final UnaryCallable<CompleteIPRotationRequest,Operation> completeIPRotationCallable()
Completes master IP rotation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CompleteIPRotationRequest request =
CompleteIPRotationRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setName("name3373707")
.build();
ApiFuture<Operation> future =
clusterManagerClient.completeIPRotationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CompleteIPRotationRequest,Operation> |
completeNodePoolUpgrade(CompleteNodePoolUpgradeRequest request)
public final void completeNodePoolUpgrade(CompleteNodePoolUpgradeRequest request)
CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CompleteNodePoolUpgradeRequest request =
CompleteNodePoolUpgradeRequest.newBuilder().setName("name3373707").build();
clusterManagerClient.completeNodePoolUpgrade(request);
}
Name | Description |
request | CompleteNodePoolUpgradeRequest The request object containing all of the parameters for the API call. |
completeNodePoolUpgradeCallable()
public final UnaryCallable<CompleteNodePoolUpgradeRequest,Empty> completeNodePoolUpgradeCallable()
CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CompleteNodePoolUpgradeRequest request =
CompleteNodePoolUpgradeRequest.newBuilder().setName("name3373707").build();
ApiFuture<Empty> future =
clusterManagerClient.completeNodePoolUpgradeCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<CompleteNodePoolUpgradeRequest,Empty> |
createCluster(CreateClusterRequest request)
public final Operation createCluster(CreateClusterRequest request)
Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.
By default, the cluster is created in the project's default network.
One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster.
Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CreateClusterRequest request =
CreateClusterRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setCluster(Cluster.newBuilder().build())
.setParent("parent-995424086")
.build();
Operation response = clusterManagerClient.createCluster(request);
}
Name | Description |
request | CreateClusterRequest The request object containing all of the parameters for the API call. |
Type | Description |
Operation |
createCluster(String parent, Cluster cluster)
public final Operation createCluster(String parent, Cluster cluster)
Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.
By default, the cluster is created in the project's default network.
One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster.
Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String parent = "parent-995424086";
Cluster cluster = Cluster.newBuilder().build();
Operation response = clusterManagerClient.createCluster(parent, cluster);
}
Name | Description |
parent | String The parent (project and location) where the cluster will be created. Specified in
the format |
cluster | Cluster Required. A cluster resource |
Type | Description |
Operation |
createCluster(String projectId, String zone, Cluster cluster)
public final Operation createCluster(String projectId, String zone, Cluster cluster)
Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.
By default, the cluster is created in the project's default network.
One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster.
Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
Cluster cluster = Cluster.newBuilder().build();
Operation response = clusterManagerClient.createCluster(projectId, zone, cluster);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field. |
cluster | Cluster Required. A cluster resource |
Type | Description |
Operation |
createClusterCallable()
public final UnaryCallable<CreateClusterRequest,Operation> createClusterCallable()
Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.
By default, the cluster is created in the project's default network.
One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster.
Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CreateClusterRequest request =
CreateClusterRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setCluster(Cluster.newBuilder().build())
.setParent("parent-995424086")
.build();
ApiFuture<Operation> future =
clusterManagerClient.createClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateClusterRequest,Operation> |
createNodePool(CreateNodePoolRequest request)
public final Operation createNodePool(CreateNodePoolRequest request)
Creates a node pool for a cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CreateNodePoolRequest request =
CreateNodePoolRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setNodePool(NodePool.newBuilder().build())
.setParent("parent-995424086")
.build();
Operation response = clusterManagerClient.createNodePool(request);
}
Name | Description |
request | CreateNodePoolRequest The request object containing all of the parameters for the API call. |
Type | Description |
Operation |
createNodePool(String parent, NodePool nodePool)
public final Operation createNodePool(String parent, NodePool nodePool)
Creates a node pool for a cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String parent = "parent-995424086";
NodePool nodePool = NodePool.newBuilder().build();
Operation response = clusterManagerClient.createNodePool(parent, nodePool);
}
Name | Description |
parent | String The parent (project, location, cluster name) where the node pool will be created.
Specified in the format |
nodePool | NodePool Required. The node pool to create. |
Type | Description |
Operation |
createNodePool(String projectId, String zone, String clusterId, NodePool nodePool)
public final Operation createNodePool(String projectId, String zone, String clusterId, NodePool nodePool)
Creates a node pool for a cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
String clusterId = "clusterId561939637";
NodePool nodePool = NodePool.newBuilder().build();
Operation response =
clusterManagerClient.createNodePool(projectId, zone, clusterId, nodePool);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field. |
clusterId | String Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. |
nodePool | NodePool Required. The node pool to create. |
Type | Description |
Operation |
createNodePoolCallable()
public final UnaryCallable<CreateNodePoolRequest,Operation> createNodePoolCallable()
Creates a node pool for a cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
CreateNodePoolRequest request =
CreateNodePoolRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setNodePool(NodePool.newBuilder().build())
.setParent("parent-995424086")
.build();
ApiFuture<Operation> future =
clusterManagerClient.createNodePoolCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateNodePoolRequest,Operation> |
deleteCluster(DeleteClusterRequest request)
public final Operation deleteCluster(DeleteClusterRequest request)
Deletes the cluster, including the Kubernetes endpoint and all worker nodes.
Firewalls and routes that were configured during cluster creation are also deleted.
Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setName("name3373707")
.build();
Operation response = clusterManagerClient.deleteCluster(request);
}
Name | Description |
request | DeleteClusterRequest The request object containing all of the parameters for the API call. |
Type | Description |
Operation |
deleteCluster(String name)
public final Operation deleteCluster(String name)
Deletes the cluster, including the Kubernetes endpoint and all worker nodes.
Firewalls and routes that were configured during cluster creation are also deleted.
Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String name = "name3373707";
Operation response = clusterManagerClient.deleteCluster(name);
}
Name | Description |
name | String The name (project, location, cluster) of the cluster to delete. Specified in the
format |
Type | Description |
Operation |
deleteCluster(String projectId, String zone, String clusterId)
public final Operation deleteCluster(String projectId, String zone, String clusterId)
Deletes the cluster, including the Kubernetes endpoint and all worker nodes.
Firewalls and routes that were configured during cluster creation are also deleted.
Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
String clusterId = "clusterId561939637";
Operation response = clusterManagerClient.deleteCluster(projectId, zone, clusterId);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field. |
clusterId | String Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. |
Type | Description |
Operation |
deleteClusterCallable()
public final UnaryCallable<DeleteClusterRequest,Operation> deleteClusterCallable()
Deletes the cluster, including the Kubernetes endpoint and all worker nodes.
Firewalls and routes that were configured during cluster creation are also deleted.
Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setName("name3373707")
.build();
ApiFuture<Operation> future =
clusterManagerClient.deleteClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeleteClusterRequest,Operation> |
deleteNodePool(DeleteNodePoolRequest request)
public final Operation deleteNodePool(DeleteNodePoolRequest request)
Deletes a node pool from a cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
DeleteNodePoolRequest request =
DeleteNodePoolRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setNodePoolId("nodePoolId1121557241")
.setName("name3373707")
.build();
Operation response = clusterManagerClient.deleteNodePool(request);
}
Name | Description |
request | DeleteNodePoolRequest The request object containing all of the parameters for the API call. |
Type | Description |
Operation |
deleteNodePool(String name)
public final Operation deleteNodePool(String name)
Deletes a node pool from a cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String name = "name3373707";
Operation response = clusterManagerClient.deleteNodePool(name);
}
Name | Description |
name | String The name (project, location, cluster, node pool id) of the node pool to delete.
Specified in the format |
Type | Description |
Operation |
deleteNodePool(String projectId, String zone, String clusterId, String nodePoolId)
public final Operation deleteNodePool(String projectId, String zone, String clusterId, String nodePoolId)
Deletes a node pool from a cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
String clusterId = "clusterId561939637";
String nodePoolId = "nodePoolId1121557241";
Operation response =
clusterManagerClient.deleteNodePool(projectId, zone, clusterId, nodePoolId);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field. |
clusterId | String Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. |
nodePoolId | String Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. |
Type | Description |
Operation |
deleteNodePoolCallable()
public final UnaryCallable<DeleteNodePoolRequest,Operation> deleteNodePoolCallable()
Deletes a node pool from a cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
DeleteNodePoolRequest request =
DeleteNodePoolRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setNodePoolId("nodePoolId1121557241")
.setName("name3373707")
.build();
ApiFuture<Operation> future =
clusterManagerClient.deleteNodePoolCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeleteNodePoolRequest,Operation> |
getCluster(GetClusterRequest request)
public final Cluster getCluster(GetClusterRequest request)
Gets the details of a specific cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetClusterRequest request =
GetClusterRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setName("name3373707")
.build();
Cluster response = clusterManagerClient.getCluster(request);
}
Name | Description |
request | GetClusterRequest The request object containing all of the parameters for the API call. |
Type | Description |
Cluster |
getCluster(String name)
public final Cluster getCluster(String name)
Gets the details of a specific cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String name = "name3373707";
Cluster response = clusterManagerClient.getCluster(name);
}
Name | Description |
name | String The name (project, location, cluster) of the cluster to retrieve. Specified in the
format |
Type | Description |
Cluster |
getCluster(String projectId, String zone, String clusterId)
public final Cluster getCluster(String projectId, String zone, String clusterId)
Gets the details of a specific cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
String clusterId = "clusterId561939637";
Cluster response = clusterManagerClient.getCluster(projectId, zone, clusterId);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field. |
clusterId | String Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. |
Type | Description |
Cluster |
getClusterCallable()
public final UnaryCallable<GetClusterRequest,Cluster> getClusterCallable()
Gets the details of a specific cluster.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetClusterRequest request =
GetClusterRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setName("name3373707")
.build();
ApiFuture<Cluster> future = clusterManagerClient.getClusterCallable().futureCall(request);
// Do something.
Cluster response = future.get();
}
Type | Description |
UnaryCallable<GetClusterRequest,Cluster> |
getJSONWebKeys(GetJSONWebKeysRequest request)
public final GetJSONWebKeysResponse getJSONWebKeys(GetJSONWebKeysRequest request)
Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetJSONWebKeysRequest request =
GetJSONWebKeysRequest.newBuilder().setParent("parent-995424086").build();
GetJSONWebKeysResponse response = clusterManagerClient.getJSONWebKeys(request);
}
Name | Description |
request | GetJSONWebKeysRequest The request object containing all of the parameters for the API call. |
Type | Description |
GetJSONWebKeysResponse |
getJSONWebKeysCallable()
public final UnaryCallable<GetJSONWebKeysRequest,GetJSONWebKeysResponse> getJSONWebKeysCallable()
Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetJSONWebKeysRequest request =
GetJSONWebKeysRequest.newBuilder().setParent("parent-995424086").build();
ApiFuture<GetJSONWebKeysResponse> future =
clusterManagerClient.getJSONWebKeysCallable().futureCall(request);
// Do something.
GetJSONWebKeysResponse response = future.get();
}
Type | Description |
UnaryCallable<GetJSONWebKeysRequest,GetJSONWebKeysResponse> |
getNodePool(GetNodePoolRequest request)
public final NodePool getNodePool(GetNodePoolRequest request)
Retrieves the requested node pool.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetNodePoolRequest request =
GetNodePoolRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setNodePoolId("nodePoolId1121557241")
.setName("name3373707")
.build();
NodePool response = clusterManagerClient.getNodePool(request);
}
Name | Description |
request | GetNodePoolRequest The request object containing all of the parameters for the API call. |
Type | Description |
NodePool |
getNodePool(String name)
public final NodePool getNodePool(String name)
Retrieves the requested node pool.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String name = "name3373707";
NodePool response = clusterManagerClient.getNodePool(name);
}
Name | Description |
name | String The name (project, location, cluster, node pool id) of the node pool to get.
Specified in the format |
Type | Description |
NodePool |
getNodePool(String projectId, String zone, String clusterId, String nodePoolId)
public final NodePool getNodePool(String projectId, String zone, String clusterId, String nodePoolId)
Retrieves the requested node pool.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
String clusterId = "clusterId561939637";
String nodePoolId = "nodePoolId1121557241";
NodePool response = clusterManagerClient.getNodePool(projectId, zone, clusterId, nodePoolId);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field. |
clusterId | String Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. |
nodePoolId | String Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. |
Type | Description |
NodePool |
getNodePoolCallable()
public final UnaryCallable<GetNodePoolRequest,NodePool> getNodePoolCallable()
Retrieves the requested node pool.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetNodePoolRequest request =
GetNodePoolRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setClusterId("clusterId561939637")
.setNodePoolId("nodePoolId1121557241")
.setName("name3373707")
.build();
ApiFuture<NodePool> future = clusterManagerClient.getNodePoolCallable().futureCall(request);
// Do something.
NodePool response = future.get();
}
Type | Description |
UnaryCallable<GetNodePoolRequest,NodePool> |
getOperation(GetOperationRequest request)
public final Operation getOperation(GetOperationRequest request)
Gets the specified operation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetOperationRequest request =
GetOperationRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setOperationId("operationId129704162")
.setName("name3373707")
.build();
Operation response = clusterManagerClient.getOperation(request);
}
Name | Description |
request | GetOperationRequest The request object containing all of the parameters for the API call. |
Type | Description |
Operation |
getOperation(String name)
public final Operation getOperation(String name)
Gets the specified operation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String name = "name3373707";
Operation response = clusterManagerClient.getOperation(name);
}
Name | Description |
name | String The name (project, location, operation id) of the operation to get. Specified in
the format |
Type | Description |
Operation |
getOperation(String projectId, String zone, String operationId)
public final Operation getOperation(String projectId, String zone, String operationId)
Gets the specified operation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
String operationId = "operationId129704162";
Operation response = clusterManagerClient.getOperation(projectId, zone, operationId);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. |
zone | String Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field. |
operationId | String Deprecated. The server-assigned |
Type | Description |
Operation |
getOperationCallable()
public final UnaryCallable<GetOperationRequest,Operation> getOperationCallable()
Gets the specified operation.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetOperationRequest request =
GetOperationRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setOperationId("operationId129704162")
.setName("name3373707")
.build();
ApiFuture<Operation> future = clusterManagerClient.getOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<GetOperationRequest,Operation> |
getServerConfig(GetServerConfigRequest request)
public final ServerConfig getServerConfig(GetServerConfigRequest request)
Returns configuration info about the Google Kubernetes Engine service.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetServerConfigRequest request =
GetServerConfigRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setName("name3373707")
.build();
ServerConfig response = clusterManagerClient.getServerConfig(request);
}
Name | Description |
request | GetServerConfigRequest The request object containing all of the parameters for the API call. |
Type | Description |
ServerConfig |
getServerConfig(String name)
public final ServerConfig getServerConfig(String name)
Returns configuration info about the Google Kubernetes Engine service.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String name = "name3373707";
ServerConfig response = clusterManagerClient.getServerConfig(name);
}
Name | Description |
name | String The name (project and location) of the server config to get, specified in the
format |
Type | Description |
ServerConfig |
getServerConfig(String projectId, String zone)
public final ServerConfig getServerConfig(String projectId, String zone)
Returns configuration info about the Google Kubernetes Engine service.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "projectId-894832108";
String zone = "zone3744684";
ServerConfig response = clusterManagerClient.getServerConfig(projectId, zone);
}
Name | Description |
projectId | String Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. |
zone | String Deprecated. The name of the Google Compute Engine zone to return operations for. This field has been deprecated and replaced by the name field. |
Type | Description |
ServerConfig |
getServerConfigCallable()
public final UnaryCallable<GetServerConfigRequest,ServerConfig> getServerConfigCallable()
Returns configuration info about the Google Kubernetes Engine service.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
GetServerConfigRequest request =
GetServerConfigRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setName("name3373707")
.build();
ApiFuture<ServerConfig> future =
clusterManagerClient.getServerConfigCallable().futureCall(request);
// Do something.
ServerConfig response = future.get();
}
Type | Description |
UnaryCallable<GetServerConfigRequest,ServerConfig> |
getSettings()
public final ClusterManagerSettings getSettings()
Type | Description |
ClusterManagerSettings |
getStub()
public ClusterManagerStub getStub()
Type | Description |
ClusterManagerStub |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listClusters(ListClustersRequest request)
public final ListClustersResponse listClusters(ListClustersRequest request)
Lists all clusters owned by a project in either the specified zone or all zones.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
ListClustersRequest request =
ListClustersRequest.newBuilder()
.setProjectId("projectId-894832108")
.setZone("zone3744684")
.setParent("parent-995424086")
.build();
ListClustersResponse response = clusterManagerClient.listClusters(request);
}
Name | Description |
request | ListClustersRequest The request object containing all of the parameters for the API call. |