Class ClusterManagerClient
- 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 (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().
| Method | Description | Method Variants |
|---|---|---|
ListClusters |
Lists all clusters owned by a project in either the specified zone or all zones. |
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 the details of a specific 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 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](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). 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. |
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.
|
UpdateCluster |
Updates the settings of a specific 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.
|
UpdateNodePool |
Updates the version and/or image type for the specified node pool. |
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.
|
SetNodePoolAutoscaling |
Sets the autoscaling settings for the specified node pool. |
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.
|
SetLoggingService |
Sets the logging service for a specific 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.
|
SetMonitoringService |
Sets the monitoring service for a specific 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.
|
SetAddonsConfig |
Sets the addons for a specific 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.
|
SetLocations |
Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead. |
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.
|
UpdateMaster |
Updates the master for a specific 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.
|
SetMasterAuth |
Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password. |
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.
|
DeleteCluster |
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. |
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.
|
ListOperations |
Lists all operations in a project in a specific zone or all zones. |
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.
|
GetOperation |
Gets the specified operation. |
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.
|
CancelOperation |
Cancels the specified operation. |
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.
|
GetServerConfig |
Returns configuration info about the Google Kubernetes Engine service. |
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.
|
GetJSONWebKeys |
Gets the public component of the cluster signing keys in JSON Web Key format. |
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.
|
ListNodePools |
Lists the node pools 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.
|
GetNodePool |
Retrieves the requested node pool. |
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 node pool 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.
|
DeleteNodePool |
Deletes a node pool from 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.
|
CompleteNodePoolUpgrade |
CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete. |
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.
|
RollbackNodePoolUpgrade |
Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed. |
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.
|
SetNodePoolManagement |
Sets the NodeManagement options for a node pool. |
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.
|
SetLabels |
Sets labels on a cluster. |
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.
|
SetLegacyAbac |
Enables or disables the ABAC authorization mechanism on 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.
|
StartIPRotation |
Starts master IP rotation. |
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.
|
CompleteIPRotation |
Completes master IP rotation. |
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.
|
SetNodePoolSize |
Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying [NodePool.locations][google.container.v1.NodePool.locations]. |
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.
|
SetNetworkPolicy |
Enables or disables Network Policy 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.
|
SetMaintenancePolicy |
Sets the maintenance policy 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.
|
ListUsableSubnetworks |
Lists subnetworks that are usable for creating clusters in a project. |
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.
|
CheckAutopilotCompatibility |
Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues. |
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.
|
FetchClusterUpgradeInfo |
Fetch upgrade information of a specific 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.
|
FetchNodePoolUpgradeInfo |
Fetch upgrade information of a specific node pool. |
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.
|
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 and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ClusterManagerSettings clusterManagerSettings =
ClusterManagerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings);
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
ClusterManagerSettings clusterManagerSettings =
ClusterManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings);
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
ClusterManagerSettings clusterManagerSettings =
ClusterManagerSettings.newHttpJsonBuilder().build();
ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClusterManagerClient(ClusterManagerSettings settings) Constructs an instance of ClusterManagerClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidcancelOperation(CancelOperationRequest request) Cancels the specified operation.final voidcancelOperation(String name) Cancels the specified operation.final voidcancelOperation(String projectId, String zone, String operationId) Cancels the specified operation.final UnaryCallable<CancelOperationRequest,com.google.protobuf.Empty> Cancels the specified operation.Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.final voidclose()final OperationCompletes master IP rotation.final OperationcompleteIPRotation(String name) Completes master IP rotation.final OperationcompleteIPRotation(String projectId, String zone, String clusterId) Completes master IP rotation.Completes master IP rotation.final voidCompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.final UnaryCallable<CompleteNodePoolUpgradeRequest,com.google.protobuf.Empty> CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.static final ClusterManagerClientcreate()Constructs an instance of ClusterManagerClient with default settings.static final ClusterManagerClientcreate(ClusterManagerSettings settings) Constructs an instance of ClusterManagerClient, using the given settings.static final ClusterManagerClientcreate(ClusterManagerStub stub) Constructs an instance of ClusterManagerClient, using the given stub for making calls.final OperationcreateCluster(CreateClusterRequest request) Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.final OperationcreateCluster(String parent, Cluster cluster) Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.final OperationcreateCluster(String projectId, String zone, Cluster cluster) Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.final OperationcreateNodePool(CreateNodePoolRequest request) Creates a node pool for a cluster.final OperationcreateNodePool(String parent, NodePool nodePool) Creates a node pool for a cluster.final OperationcreateNodePool(String projectId, String zone, String clusterId, NodePool nodePool) Creates a node pool for a cluster.Creates a node pool for a cluster.final OperationdeleteCluster(DeleteClusterRequest request) Deletes the cluster, including the Kubernetes endpoint and all worker nodes.final OperationdeleteCluster(String name) Deletes the cluster, including the Kubernetes endpoint and all worker nodes.final OperationdeleteCluster(String projectId, String zone, String clusterId) Deletes the cluster, including the Kubernetes endpoint and all worker nodes.Deletes the cluster, including the Kubernetes endpoint and all worker nodes.final OperationdeleteNodePool(DeleteNodePoolRequest request) Deletes a node pool from a cluster.final OperationdeleteNodePool(String name) Deletes a node pool from a cluster.final OperationdeleteNodePool(String projectId, String zone, String clusterId, String nodePoolId) Deletes a node pool from a cluster.Deletes a node pool from a cluster.final ClusterUpgradeInfoFetch upgrade information of a specific cluster.final ClusterUpgradeInfoFetch upgrade information of a specific cluster.Fetch upgrade information of a specific cluster.final NodePoolUpgradeInfoFetch upgrade information of a specific node pool.final NodePoolUpgradeInfoFetch upgrade information of a specific node pool.Fetch upgrade information of a specific node pool.final ClustergetCluster(GetClusterRequest request) Gets the details of a specific cluster.final ClustergetCluster(String name) Gets the details of a specific cluster.final ClustergetCluster(String projectId, String zone, String clusterId) Gets the details of a specific cluster.Gets the details of a specific cluster.final GetJSONWebKeysResponsegetJSONWebKeys(GetJSONWebKeysRequest request) Gets the public component of the cluster signing keys in JSON Web Key format.Gets the public component of the cluster signing keys in JSON Web Key format.final NodePoolgetNodePool(GetNodePoolRequest request) Retrieves the requested node pool.final NodePoolgetNodePool(String name) Retrieves the requested node pool.final NodePoolgetNodePool(String projectId, String zone, String clusterId, String nodePoolId) Retrieves the requested node pool.Retrieves the requested node pool.final OperationgetOperation(GetOperationRequest request) Gets the specified operation.final OperationgetOperation(String name) Gets the specified operation.final OperationgetOperation(String projectId, String zone, String operationId) Gets the specified operation.Gets the specified operation.final ServerConfiggetServerConfig(GetServerConfigRequest request) Returns configuration info about the Google Kubernetes Engine service.final ServerConfiggetServerConfig(String name) Returns configuration info about the Google Kubernetes Engine service.final ServerConfiggetServerConfig(String projectId, String zone) Returns configuration info about the Google Kubernetes Engine service.Returns configuration info about the Google Kubernetes Engine service.final ClusterManagerSettingsgetStub()booleanbooleanfinal ListClustersResponselistClusters(ListClustersRequest request) Lists all clusters owned by a project in either the specified zone or all zones.final ListClustersResponselistClusters(String parent) Lists all clusters owned by a project in either the specified zone or all zones.final ListClustersResponselistClusters(String projectId, String zone) Lists all clusters owned by a project in either the specified zone or all zones.Lists all clusters owned by a project in either the specified zone or all zones.final ListNodePoolsResponselistNodePools(ListNodePoolsRequest request) Lists the node pools for a cluster.final ListNodePoolsResponselistNodePools(String parent) Lists the node pools for a cluster.final ListNodePoolsResponselistNodePools(String projectId, String zone, String clusterId) Lists the node pools for a cluster.Lists the node pools for a cluster.final ListOperationsResponselistOperations(ListOperationsRequest request) Lists all operations in a project in a specific zone or all zones.final ListOperationsResponselistOperations(String parent) Lists all operations in a project in a specific zone or all zones.final ListOperationsResponselistOperations(String projectId, String zone) Lists all operations in a project in a specific zone or all zones.Lists all operations in a project in a specific zone or all zones.Lists subnetworks that are usable for creating clusters in a project.Lists subnetworks that are usable for creating clusters in a project.final UnaryCallable<ListUsableSubnetworksRequest,ClusterManagerClient.ListUsableSubnetworksPagedResponse> Lists subnetworks that are usable for creating clusters in a project.final OperationRolls back a previously Aborted or Failed NodePool upgrade.final OperationRolls back a previously Aborted or Failed NodePool upgrade.final OperationrollbackNodePoolUpgrade(String projectId, String zone, String clusterId, String nodePoolId) Rolls back a previously Aborted or Failed NodePool upgrade.Rolls back a previously Aborted or Failed NodePool upgrade.final OperationsetAddonsConfig(SetAddonsConfigRequest request) Sets the addons for a specific cluster.final OperationsetAddonsConfig(String name, AddonsConfig addonsConfig) Sets the addons for a specific cluster.final OperationsetAddonsConfig(String projectId, String zone, String clusterId, AddonsConfig addonsConfig) Sets the addons for a specific cluster.Sets the addons for a specific cluster.final OperationsetLabels(SetLabelsRequest request) Sets labels on a cluster.Sets labels on a cluster.final OperationsetLegacyAbac(SetLegacyAbacRequest request) Enables or disables the ABAC authorization mechanism on a cluster.final OperationsetLegacyAbac(String name, boolean enabled) Enables or disables the ABAC authorization mechanism on a cluster.final OperationsetLegacyAbac(String projectId, String zone, String clusterId, boolean enabled) Enables or disables the ABAC authorization mechanism on a cluster.Enables or disables the ABAC authorization mechanism on a cluster.final OperationsetLocations(SetLocationsRequest request) Deprecated.This method is deprecated and will be removed in the next major version update.final OperationDeprecated.This method is deprecated and will be removed in the next major version update.final OperationsetLocations(String name, List<String> locations) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated.This method is deprecated and will be removed in the next major version update.final OperationSets the logging service for a specific cluster.final OperationsetLoggingService(String name, String loggingService) Sets the logging service for a specific cluster.final OperationsetLoggingService(String projectId, String zone, String clusterId, String loggingService) Sets the logging service for a specific cluster.Sets the logging service for a specific cluster.final OperationSets the maintenance policy for a cluster.final OperationsetMaintenancePolicy(String name, MaintenancePolicy maintenancePolicy) Sets the maintenance policy for a cluster.final OperationsetMaintenancePolicy(String projectId, String zone, String clusterId, MaintenancePolicy maintenancePolicy) Sets the maintenance policy for a cluster.Sets the maintenance policy for a cluster.final OperationsetMasterAuth(SetMasterAuthRequest request) Sets master auth materials.Sets master auth materials.final OperationSets the monitoring service for a specific cluster.final OperationsetMonitoringService(String name, String monitoringService) Sets the monitoring service for a specific cluster.final OperationsetMonitoringService(String projectId, String zone, String clusterId, String monitoringService) Sets the monitoring service for a specific cluster.Sets the monitoring service for a specific cluster.final OperationsetNetworkPolicy(SetNetworkPolicyRequest request) Enables or disables Network Policy for a cluster.final OperationsetNetworkPolicy(String name, NetworkPolicy networkPolicy) Enables or disables Network Policy for a cluster.final OperationsetNetworkPolicy(String projectId, String zone, String clusterId, NetworkPolicy networkPolicy) Enables or disables Network Policy for a cluster.Enables or disables Network Policy for a cluster.final OperationSets the autoscaling settings for the specified node pool.Sets the autoscaling settings for the specified node pool.final OperationSets the NodeManagement options for a node pool.Sets the NodeManagement options for a node pool.final OperationsetNodePoolSize(SetNodePoolSizeRequest request) Sets the size for a specific node pool.Sets the size for a specific node pool.voidshutdown()voidfinal OperationstartIPRotation(StartIPRotationRequest request) Starts master IP rotation.final OperationstartIPRotation(String name) Starts master IP rotation.final OperationstartIPRotation(String projectId, String zone, String clusterId) Starts master IP rotation.Starts master IP rotation.final OperationupdateCluster(UpdateClusterRequest request) Updates the settings of a specific cluster.final OperationupdateCluster(String name, ClusterUpdate update) Updates the settings of a specific cluster.final OperationupdateCluster(String projectId, String zone, String clusterId, ClusterUpdate update) Updates the settings of a specific cluster.Updates the settings of a specific cluster.final OperationupdateMaster(UpdateMasterRequest request) Updates the master for a specific cluster.final OperationupdateMaster(String name, String masterVersion) Updates the master for a specific cluster.final OperationupdateMaster(String projectId, String zone, String clusterId, String masterVersion) Updates the master for a specific cluster.Updates the master for a specific cluster.final OperationupdateNodePool(UpdateNodePoolRequest request) Updates the version and/or image type for the specified node pool.Updates the version and/or image type for the specified node pool.
-
Constructor Details
-
ClusterManagerClient
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.- Throws:
IOException
-
ClusterManagerClient
-
-
Method Details
-
create
Constructs an instance of ClusterManagerClient with default settings.- Throws:
IOException
-
create
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.- Throws:
IOException
-
create
Constructs an instance of ClusterManagerClient, using the given stub for making calls. This is for advanced usage - prefer using create(ClusterManagerSettings). -
getSettings
-
getStub
-
listClusters
Lists all clusters owned by a project in either the specified zone or all zones.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String parent = "parent-995424086"; ListClustersResponse response = clusterManagerClient.listClusters(parent); }- Parameters:
parent- The parent (project and location) where the clusters will be listed. Specified in the format `projects/*/locations/*`. Location "-" matches all zones and all regions.- Throws:
ApiException- if the remote call fails
-
listClusters
Lists all clusters owned by a project in either the specified zone or all zones.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; ListClustersResponse response = clusterManagerClient.listClusters(projectId, zone); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field.- Throws:
ApiException- if the remote call fails
-
listClusters
Lists all clusters owned by a project in either the specified zone or all zones.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListClustersRequest request = ListClustersRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setParent("parent-995424086") .build(); ListClustersResponse response = clusterManagerClient.listClusters(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listClustersCallable
Lists all clusters owned by a project in either the specified zone or all zones.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListClustersRequest request = ListClustersRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setParent("parent-995424086") .build(); ApiFuture<ListClustersResponse> future = clusterManagerClient.listClustersCallable().futureCall(request); // Do something. ListClustersResponse response = future.get(); } -
getCluster
Gets the details of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; Cluster response = clusterManagerClient.getCluster(name); }- Parameters:
name- The name (project, location, cluster) of the cluster to retrieve. Specified in the format `projects/*/locations/*/clusters/*`.- Throws:
ApiException- if the remote call fails
-
getCluster
Gets the details of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; Cluster response = clusterManagerClient.getCluster(projectId, zone, clusterId); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
getCluster
Gets the details of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { GetClusterRequest request = GetClusterRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setName("name3373707") .build(); Cluster response = clusterManagerClient.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 the details of a specific 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 (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(); } -
createCluster
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](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String parent = "parent-995424086"; Cluster cluster = Cluster.newBuilder().build(); Operation response = clusterManagerClient.createCluster(parent, cluster); }- Parameters:
parent- The parent (project and location) where the cluster will be created. Specified in the format `projects/*/locations/*`.cluster- Required. A [cluster resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)- Throws:
ApiException- if the remote call fails
-
createCluster
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](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; Cluster cluster = Cluster.newBuilder().build(); Operation response = clusterManagerClient.createCluster(projectId, zone, cluster); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.cluster- Required. A [cluster resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)- Throws:
ApiException- if the remote call fails
-
createCluster
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](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (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(); } -
updateCluster
Updates the settings of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; ClusterUpdate update = ClusterUpdate.newBuilder().build(); Operation response = clusterManagerClient.updateCluster(name, update); }- Parameters:
name- The name (project, location, cluster) of the cluster to update. Specified in the format `projects/*/locations/*/clusters/*`.update- Required. A description of the update.- Throws:
ApiException- if the remote call fails
-
updateCluster
public final Operation updateCluster(String projectId, String zone, String clusterId, ClusterUpdate update) Updates the settings of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; ClusterUpdate update = ClusterUpdate.newBuilder().build(); Operation response = clusterManagerClient.updateCluster(projectId, zone, clusterId, update); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.update- Required. A description of the update.- Throws:
ApiException- if the remote call fails
-
updateCluster
Updates the settings of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { UpdateClusterRequest request = UpdateClusterRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setUpdate(ClusterUpdate.newBuilder().build()) .setName("name3373707") .build(); Operation response = clusterManagerClient.updateCluster(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateClusterCallable
Updates the settings of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { UpdateClusterRequest request = UpdateClusterRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setUpdate(ClusterUpdate.newBuilder().build()) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.updateClusterCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateNodePool
Updates the version and/or image type for the specified node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { UpdateNodePoolRequest request = UpdateNodePoolRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setNodeVersion("nodeVersion1155309686") .setImageType("imageType-878147787") .setName("name3373707") .setImage("image100313435") .setImageProject("imageProject288951614") .addAllLocations(new ArrayList<String>()) .setWorkloadMetadataConfig(WorkloadMetadataConfig.newBuilder().build()) .setUpgradeSettings(NodePool.UpgradeSettings.newBuilder().build()) .setTags(NetworkTags.newBuilder().build()) .setTaints(NodeTaints.newBuilder().build()) .setLabels(NodeLabels.newBuilder().build()) .setLinuxNodeConfig(LinuxNodeConfig.newBuilder().build()) .setKubeletConfig(NodeKubeletConfig.newBuilder().build()) .setNodeNetworkConfig(NodeNetworkConfig.newBuilder().build()) .setGcfsConfig(GcfsConfig.newBuilder().build()) .setConfidentialNodes(ConfidentialNodes.newBuilder().build()) .setGvnic(VirtualNIC.newBuilder().build()) .setEtag("etag3123477") .setFastSocket(FastSocket.newBuilder().build()) .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) .setResourceLabels(ResourceLabels.newBuilder().build()) .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) .addAllAccelerators(new ArrayList<AcceleratorConfig>()) .setMachineType("machineType-218117087") .setDiskType("diskType279771767") .setDiskSizeGb(-757478089) .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) .setContainerdConfig(ContainerdConfig.newBuilder().build()) .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) .addAllStoragePools(new ArrayList<String>()) .setMaxRunDuration(Duration.newBuilder().build()) .setFlexStart(true) .setBootDisk(BootDisk.newBuilder().build()) .setNodeDrainConfig(NodePool.NodeDrainConfig.newBuilder().build()) .setConsolidationDelay(Duration.newBuilder().build()) .setTaintConfig(TaintConfig.newBuilder().build()) .build(); Operation response = clusterManagerClient.updateNodePool(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateNodePoolCallable
Updates the version and/or image type for the specified node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { UpdateNodePoolRequest request = UpdateNodePoolRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setNodeVersion("nodeVersion1155309686") .setImageType("imageType-878147787") .setName("name3373707") .setImage("image100313435") .setImageProject("imageProject288951614") .addAllLocations(new ArrayList<String>()) .setWorkloadMetadataConfig(WorkloadMetadataConfig.newBuilder().build()) .setUpgradeSettings(NodePool.UpgradeSettings.newBuilder().build()) .setTags(NetworkTags.newBuilder().build()) .setTaints(NodeTaints.newBuilder().build()) .setLabels(NodeLabels.newBuilder().build()) .setLinuxNodeConfig(LinuxNodeConfig.newBuilder().build()) .setKubeletConfig(NodeKubeletConfig.newBuilder().build()) .setNodeNetworkConfig(NodeNetworkConfig.newBuilder().build()) .setGcfsConfig(GcfsConfig.newBuilder().build()) .setConfidentialNodes(ConfidentialNodes.newBuilder().build()) .setGvnic(VirtualNIC.newBuilder().build()) .setEtag("etag3123477") .setFastSocket(FastSocket.newBuilder().build()) .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build()) .setResourceLabels(ResourceLabels.newBuilder().build()) .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build()) .addAllAccelerators(new ArrayList<AcceleratorConfig>()) .setMachineType("machineType-218117087") .setDiskType("diskType279771767") .setDiskSizeGb(-757478089) .setResourceManagerTags(ResourceManagerTags.newBuilder().build()) .setContainerdConfig(ContainerdConfig.newBuilder().build()) .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build()) .addAllStoragePools(new ArrayList<String>()) .setMaxRunDuration(Duration.newBuilder().build()) .setFlexStart(true) .setBootDisk(BootDisk.newBuilder().build()) .setNodeDrainConfig(NodePool.NodeDrainConfig.newBuilder().build()) .setConsolidationDelay(Duration.newBuilder().build()) .setTaintConfig(TaintConfig.newBuilder().build()) .build(); ApiFuture<Operation> future = clusterManagerClient.updateNodePoolCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setNodePoolAutoscaling
Sets the autoscaling settings for the specified node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetNodePoolAutoscalingRequest request = SetNodePoolAutoscalingRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setAutoscaling(NodePoolAutoscaling.newBuilder().build()) .setName("name3373707") .build(); Operation response = clusterManagerClient.setNodePoolAutoscaling(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setNodePoolAutoscalingCallable
public final UnaryCallable<SetNodePoolAutoscalingRequest,Operation> setNodePoolAutoscalingCallable()Sets the autoscaling settings for the specified node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetNodePoolAutoscalingRequest request = SetNodePoolAutoscalingRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setAutoscaling(NodePoolAutoscaling.newBuilder().build()) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setNodePoolAutoscalingCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setLoggingService
Sets the logging service for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; String loggingService = "loggingService1098570326"; Operation response = clusterManagerClient.setLoggingService(name, loggingService); }- Parameters:
name- The name (project, location, cluster) of the cluster to set logging. Specified in the format `projects/*/locations/*/clusters/*`.loggingService- Required. The logging service the cluster should use to write logs. Currently available options:- `logging.googleapis.com/kubernetes` - The Cloud Logging service with a Kubernetes-native resource model
- `logging.googleapis.com` - The legacy Cloud Logging service (no longer available as of GKE 1.15).
- `none` - no logs will be exported from the cluster.
If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
- Throws:
ApiException- if the remote call fails
-
setLoggingService
public final Operation setLoggingService(String projectId, String zone, String clusterId, String loggingService) Sets the logging service for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; String loggingService = "loggingService1098570326"; Operation response = clusterManagerClient.setLoggingService(projectId, zone, clusterId, loggingService); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.loggingService- Required. The logging service the cluster should use to write logs. Currently available options:- `logging.googleapis.com/kubernetes` - The Cloud Logging service with a Kubernetes-native resource model
- `logging.googleapis.com` - The legacy Cloud Logging service (no longer available as of GKE 1.15).
- `none` - no logs will be exported from the cluster.
If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
- Throws:
ApiException- if the remote call fails
-
setLoggingService
Sets the logging service for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetLoggingServiceRequest request = SetLoggingServiceRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setLoggingService("loggingService1098570326") .setName("name3373707") .build(); Operation response = clusterManagerClient.setLoggingService(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setLoggingServiceCallable
Sets the logging service for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetLoggingServiceRequest request = SetLoggingServiceRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setLoggingService("loggingService1098570326") .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setLoggingServiceCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setMonitoringService
Sets the monitoring service for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; String monitoringService = "monitoringService-1431578291"; Operation response = clusterManagerClient.setMonitoringService(name, monitoringService); }- Parameters:
name- The name (project, location, cluster) of the cluster to set monitoring. Specified in the format `projects/*/locations/*/clusters/*`.monitoringService- Required. The monitoring service the cluster should use to write metrics. Currently available options:- `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a Kubernetes-native resource model
- `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no longer available as of GKE 1.15).
- `none` - No metrics will be exported from the cluster.
If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
- Throws:
ApiException- if the remote call fails
-
setMonitoringService
public final Operation setMonitoringService(String projectId, String zone, String clusterId, String monitoringService) Sets the monitoring service for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; String monitoringService = "monitoringService-1431578291"; Operation response = clusterManagerClient.setMonitoringService(projectId, zone, clusterId, monitoringService); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.monitoringService- Required. The monitoring service the cluster should use to write metrics. Currently available options:- `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a Kubernetes-native resource model
- `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no longer available as of GKE 1.15).
- `none` - No metrics will be exported from the cluster.
If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
- Throws:
ApiException- if the remote call fails
-
setMonitoringService
Sets the monitoring service for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetMonitoringServiceRequest request = SetMonitoringServiceRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setMonitoringService("monitoringService-1431578291") .setName("name3373707") .build(); Operation response = clusterManagerClient.setMonitoringService(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setMonitoringServiceCallable
Sets the monitoring service for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetMonitoringServiceRequest request = SetMonitoringServiceRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setMonitoringService("monitoringService-1431578291") .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setMonitoringServiceCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setAddonsConfig
Sets the addons for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; AddonsConfig addonsConfig = AddonsConfig.newBuilder().build(); Operation response = clusterManagerClient.setAddonsConfig(name, addonsConfig); }- Parameters:
name- The name (project, location, cluster) of the cluster to set addons. Specified in the format `projects/*/locations/*/clusters/*`.addonsConfig- Required. The desired configurations for the various addons available to run in the cluster.- Throws:
ApiException- if the remote call fails
-
setAddonsConfig
public final Operation setAddonsConfig(String projectId, String zone, String clusterId, AddonsConfig addonsConfig) Sets the addons for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; AddonsConfig addonsConfig = AddonsConfig.newBuilder().build(); Operation response = clusterManagerClient.setAddonsConfig(projectId, zone, clusterId, addonsConfig); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.addonsConfig- Required. The desired configurations for the various addons available to run in the cluster.- Throws:
ApiException- if the remote call fails
-
setAddonsConfig
Sets the addons for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetAddonsConfigRequest request = SetAddonsConfigRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setAddonsConfig(AddonsConfig.newBuilder().build()) .setName("name3373707") .build(); Operation response = clusterManagerClient.setAddonsConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setAddonsConfigCallable
Sets the addons for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetAddonsConfigRequest request = SetAddonsConfigRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setAddonsConfig(AddonsConfig.newBuilder().build()) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setAddonsConfigCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setLocations
Deprecated.This method is deprecated and will be removed in the next major version update.Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; List<String> locations = new ArrayList<>(); Operation response = clusterManagerClient.setLocations(name, locations); }- Parameters:
name- The name (project, location, cluster) of the cluster to set locations. Specified in the format `projects/*/locations/*/clusters/*`.locations- Required. The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes should be located. Changing the locations a cluster is in will result in nodes being either created or removed from the cluster, depending on whether locations are being added or removed.This list must always include the cluster's primary zone.
- Throws:
ApiException- if the remote call fails
-
setLocations
@Deprecated public final Operation setLocations(String projectId, String zone, String clusterId, List<String> locations) Deprecated.This method is deprecated and will be removed in the next major version update.Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; List<String> locations = new ArrayList<>(); Operation response = clusterManagerClient.setLocations(projectId, zone, clusterId, locations); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.locations- Required. The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes should be located. Changing the locations a cluster is in will result in nodes being either created or removed from the cluster, depending on whether locations are being added or removed.This list must always include the cluster's primary zone.
- Throws:
ApiException- if the remote call fails
-
setLocations
Deprecated.This method is deprecated and will be removed in the next major version update.Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetLocationsRequest request = SetLocationsRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .addAllLocations(new ArrayList<String>()) .setName("name3373707") .build(); Operation response = clusterManagerClient.setLocations(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setLocationsCallable
Deprecated.This method is deprecated and will be removed in the next major version update.Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetLocationsRequest request = SetLocationsRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .addAllLocations(new ArrayList<String>()) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setLocationsCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateMaster
Updates the master for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; String masterVersion = "masterVersion1167095830"; Operation response = clusterManagerClient.updateMaster(name, masterVersion); }- Parameters:
name- The name (project, location, cluster) of the cluster to update. Specified in the format `projects/*/locations/*/clusters/*`.masterVersion- Required. The Kubernetes version to change the master to.Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior:
- "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the default Kubernetes version
- Throws:
ApiException- if the remote call fails
-
updateMaster
public final Operation updateMaster(String projectId, String zone, String clusterId, String masterVersion) Updates the master for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; String masterVersion = "masterVersion1167095830"; Operation response = clusterManagerClient.updateMaster(projectId, zone, clusterId, masterVersion); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.masterVersion- Required. The Kubernetes version to change the master to.Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior:
- "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the default Kubernetes version
- Throws:
ApiException- if the remote call fails
-
updateMaster
Updates the master for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { UpdateMasterRequest request = UpdateMasterRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setMasterVersion("masterVersion1167095830") .setName("name3373707") .build(); Operation response = clusterManagerClient.updateMaster(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMasterCallable
Updates the master for a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { UpdateMasterRequest request = UpdateMasterRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setMasterVersion("masterVersion1167095830") .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.updateMasterCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setMasterAuth
Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetMasterAuthRequest request = SetMasterAuthRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setUpdate(MasterAuth.newBuilder().build()) .setName("name3373707") .build(); Operation response = clusterManagerClient.setMasterAuth(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setMasterAuthCallable
Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetMasterAuthRequest request = SetMasterAuthRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setUpdate(MasterAuth.newBuilder().build()) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setMasterAuthCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteCluster
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; Operation response = clusterManagerClient.deleteCluster(name); }- Parameters:
name- The name (project, location, cluster) of the cluster to delete. Specified in the format `projects/*/locations/*/clusters/*`.- Throws:
ApiException- if the remote call fails
-
deleteCluster
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; Operation response = clusterManagerClient.deleteCluster(projectId, zone, clusterId); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
deleteCluster
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { DeleteClusterRequest request = DeleteClusterRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setName("name3373707") .build(); Operation response = clusterManagerClient.deleteCluster(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (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(); } -
listOperations
Lists all operations in a project in a specific zone or all zones.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String parent = "parent-995424086"; ListOperationsResponse response = clusterManagerClient.listOperations(parent); }- Parameters:
parent- The parent (project and location) where the operations will be listed. Specified in the format `projects/*/locations/*`. Location "-" matches all zones and all regions.- Throws:
ApiException- if the remote call fails
-
listOperations
Lists all operations in a project in a specific zone or all zones.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; ListOperationsResponse response = clusterManagerClient.listOperations(projectId, zone); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field.- Throws:
ApiException- if the remote call fails
-
listOperations
Lists all operations in a project in a specific zone or all zones.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListOperationsRequest request = ListOperationsRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setParent("parent-995424086") .build(); ListOperationsResponse response = clusterManagerClient.listOperations(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listOperationsCallable
Lists all operations in a project in a specific zone or all zones.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListOperationsRequest request = ListOperationsRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setParent("parent-995424086") .build(); ApiFuture<ListOperationsResponse> future = clusterManagerClient.listOperationsCallable().futureCall(request); // Do something. ListOperationsResponse response = future.get(); } -
getOperation
Gets the specified operation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; Operation response = clusterManagerClient.getOperation(name); }- Parameters:
name- The name (project, location, operation id) of the operation to get. Specified in the format `projects/*/locations/*/operations/*`.- Throws:
ApiException- if the remote call fails
-
getOperation
Gets the specified operation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String operationId = "operationId129704162"; Operation response = clusterManagerClient.getOperation(projectId, zone, operationId); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.operationId- Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
getOperation
Gets the specified operation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { GetOperationRequest request = GetOperationRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setOperationId("operationId129704162") .setName("name3373707") .build(); Operation response = clusterManagerClient.getOperation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getOperationCallable
Gets the specified operation.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 (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(); } -
cancelOperation
Cancels the specified operation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; clusterManagerClient.cancelOperation(name); }- Parameters:
name- The name (project, location, operation id) of the operation to cancel. Specified in the format `projects/*/locations/*/operations/*`.- Throws:
ApiException- if the remote call fails
-
cancelOperation
Cancels the specified operation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String operationId = "operationId129704162"; clusterManagerClient.cancelOperation(projectId, zone, operationId); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field.operationId- Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
cancelOperation
Cancels the specified operation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { CancelOperationRequest request = CancelOperationRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setOperationId("operationId129704162") .setName("name3373707") .build(); clusterManagerClient.cancelOperation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
cancelOperationCallable
public final UnaryCallable<CancelOperationRequest,com.google.protobuf.Empty> cancelOperationCallable()Cancels the specified operation.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 (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(); } -
getServerConfig
Returns configuration info about the Google Kubernetes Engine 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; ServerConfig response = clusterManagerClient.getServerConfig(name); }- Parameters:
name- 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
Returns configuration info about the Google Kubernetes Engine 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; ServerConfig response = clusterManagerClient.getServerConfig(projectId, zone); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
getServerConfig
Returns configuration info about the Google Kubernetes Engine 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { GetServerConfigRequest request = GetServerConfigRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setName("name3373707") .build(); ServerConfig response = clusterManagerClient.getServerConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getServerConfigCallable
Returns configuration info about the Google Kubernetes Engine 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 (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(); } -
getJSONWebKeys
Gets the public component of the cluster signing keys in JSON Web Key format.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { GetJSONWebKeysRequest request = GetJSONWebKeysRequest.newBuilder().setParent("parent-995424086").build(); GetJSONWebKeysResponse response = clusterManagerClient.getJSONWebKeys(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getJSONWebKeysCallable
Gets the public component of the cluster signing keys in JSON Web Key format.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 (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(); } -
listNodePools
Lists the node pools 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String parent = "parent-995424086"; ListNodePoolsResponse response = clusterManagerClient.listNodePools(parent); }- Parameters:
parent- The parent (project, location, cluster name) where the node pools will be listed. Specified in the format `projects/*/locations/*/clusters/*`.- Throws:
ApiException- if the remote call fails
-
listNodePools
Lists the node pools 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; ListNodePoolsResponse response = clusterManagerClient.listNodePools(projectId, zone, clusterId); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.clusterId- Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.- Throws:
ApiException- if the remote call fails
-
listNodePools
Lists the node pools 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListNodePoolsRequest request = ListNodePoolsRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setParent("parent-995424086") .build(); ListNodePoolsResponse response = clusterManagerClient.listNodePools(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listNodePoolsCallable
Lists the node pools 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListNodePoolsRequest request = ListNodePoolsRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setParent("parent-995424086") .build(); ApiFuture<ListNodePoolsResponse> future = clusterManagerClient.listNodePoolsCallable().futureCall(request); // Do something. ListNodePoolsResponse response = future.get(); } -
getNodePool
Retrieves the requested node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; NodePool response = clusterManagerClient.getNodePool(name); }- Parameters:
name- The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.- Throws:
ApiException- if the remote call fails
-
getNodePool
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (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); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.nodePoolId- Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
getNodePool
Retrieves the requested node pool.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 (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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getNodePoolCallable
Retrieves the requested node pool.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 (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(); } -
createNodePool
Creates a node pool 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String parent = "parent-995424086"; NodePool nodePool = NodePool.newBuilder().build(); Operation response = clusterManagerClient.createNodePool(parent, nodePool); }- Parameters:
parent- The parent (project, location, cluster name) where the node pool will be created. Specified in the format `projects/*/locations/*/clusters/*`.nodePool- Required. The node pool to create.- Throws:
ApiException- if the remote call fails
-
createNodePool
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (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); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.clusterId- Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.nodePool- Required. The node pool to create.- Throws:
ApiException- if the remote call fails
-
createNodePool
Creates a node pool 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 (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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createNodePoolCallable
Creates a node pool 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 (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(); } -
deleteNodePool
Deletes a node pool from 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; Operation response = clusterManagerClient.deleteNodePool(name); }- Parameters:
name- The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.- Throws:
ApiException- if the remote call fails
-
deleteNodePool
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 and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require 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 (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); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.nodePoolId- Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
deleteNodePool
Deletes a node pool from 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 (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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteNodePoolCallable
Deletes a node pool from 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 (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(); } -
completeNodePoolUpgrade
CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { CompleteNodePoolUpgradeRequest request = CompleteNodePoolUpgradeRequest.newBuilder().setName("name3373707").build(); clusterManagerClient.completeNodePoolUpgrade(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
completeNodePoolUpgradeCallable
public final UnaryCallable<CompleteNodePoolUpgradeRequest,com.google.protobuf.Empty> completeNodePoolUpgradeCallable()CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { CompleteNodePoolUpgradeRequest request = CompleteNodePoolUpgradeRequest.newBuilder().setName("name3373707").build(); ApiFuture<Empty> future = clusterManagerClient.completeNodePoolUpgradeCallable().futureCall(request); // Do something. future.get(); } -
rollbackNodePoolUpgrade
Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; Operation response = clusterManagerClient.rollbackNodePoolUpgrade(name); }- Parameters:
name- The name (project, location, cluster, node pool id) of the node poll to rollback upgrade. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.- Throws:
ApiException- if the remote call fails
-
rollbackNodePoolUpgrade
public final Operation rollbackNodePoolUpgrade(String projectId, String zone, String clusterId, String nodePoolId) Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; String nodePoolId = "nodePoolId1121557241"; Operation response = clusterManagerClient.rollbackNodePoolUpgrade(projectId, zone, clusterId, nodePoolId); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field.nodePoolId- Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
rollbackNodePoolUpgrade
Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { RollbackNodePoolUpgradeRequest request = RollbackNodePoolUpgradeRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setName("name3373707") .setRespectPdb(true) .build(); Operation response = clusterManagerClient.rollbackNodePoolUpgrade(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
rollbackNodePoolUpgradeCallable
public final UnaryCallable<RollbackNodePoolUpgradeRequest,Operation> rollbackNodePoolUpgradeCallable()Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { RollbackNodePoolUpgradeRequest request = RollbackNodePoolUpgradeRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setName("name3373707") .setRespectPdb(true) .build(); ApiFuture<Operation> future = clusterManagerClient.rollbackNodePoolUpgradeCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setNodePoolManagement
Sets the NodeManagement options for a node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetNodePoolManagementRequest request = SetNodePoolManagementRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setManagement(NodeManagement.newBuilder().build()) .setName("name3373707") .build(); Operation response = clusterManagerClient.setNodePoolManagement(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setNodePoolManagementCallable
Sets the NodeManagement options for a node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetNodePoolManagementRequest request = SetNodePoolManagementRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setManagement(NodeManagement.newBuilder().build()) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setNodePoolManagementCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setLabels
Sets labels on 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetLabelsRequest request = SetLabelsRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .putAllResourceLabels(new HashMap<String, String>()) .setLabelFingerprint("labelFingerprint379449680") .setName("name3373707") .build(); Operation response = clusterManagerClient.setLabels(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setLabelsCallable
Sets labels on 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetLabelsRequest request = SetLabelsRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .putAllResourceLabels(new HashMap<String, String>()) .setLabelFingerprint("labelFingerprint379449680") .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setLabelsCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setLegacyAbac
Enables or disables the ABAC authorization mechanism on 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; boolean enabled = true; Operation response = clusterManagerClient.setLegacyAbac(name, enabled); }- Parameters:
name- The name (project, location, cluster name) of the cluster to set legacy abac. Specified in the format `projects/*/locations/*/clusters/*`.enabled- Required. Whether ABAC authorization will be enabled in the cluster.- Throws:
ApiException- if the remote call fails
-
setLegacyAbac
public final Operation setLegacyAbac(String projectId, String zone, String clusterId, boolean enabled) Enables or disables the ABAC authorization mechanism on 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; boolean enabled = true; Operation response = clusterManagerClient.setLegacyAbac(projectId, zone, clusterId, enabled); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.enabled- Required. Whether ABAC authorization will be enabled in the cluster.- Throws:
ApiException- if the remote call fails
-
setLegacyAbac
Enables or disables the ABAC authorization mechanism on 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetLegacyAbacRequest request = SetLegacyAbacRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setEnabled(true) .setName("name3373707") .build(); Operation response = clusterManagerClient.setLegacyAbac(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setLegacyAbacCallable
Enables or disables the ABAC authorization mechanism on 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetLegacyAbacRequest request = SetLegacyAbacRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setEnabled(true) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setLegacyAbacCallable().futureCall(request); // Do something. Operation response = future.get(); } -
startIPRotation
Starts master IP rotation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; Operation response = clusterManagerClient.startIPRotation(name); }- Parameters:
name- The name (project, location, cluster name) of the cluster to start IP rotation. Specified in the format `projects/*/locations/*/clusters/*`.- Throws:
ApiException- if the remote call fails
-
startIPRotation
Starts master IP rotation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; Operation response = clusterManagerClient.startIPRotation(projectId, zone, clusterId); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
startIPRotation
Starts master IP rotation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { StartIPRotationRequest request = StartIPRotationRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setName("name3373707") .setRotateCredentials(true) .build(); Operation response = clusterManagerClient.startIPRotation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
startIPRotationCallable
Starts master IP rotation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { StartIPRotationRequest request = StartIPRotationRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setName("name3373707") .setRotateCredentials(true) .build(); ApiFuture<Operation> future = clusterManagerClient.startIPRotationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
completeIPRotation
Completes master IP rotation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; Operation response = clusterManagerClient.completeIPRotation(name); }- Parameters:
name- The name (project, location, cluster name) of the cluster to complete IP rotation. Specified in the format `projects/*/locations/*/clusters/*`.- Throws:
ApiException- if the remote call fails
-
completeIPRotation
Completes master IP rotation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; Operation response = clusterManagerClient.completeIPRotation(projectId, zone, clusterId); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.- Throws:
ApiException- if the remote call fails
-
completeIPRotation
Completes master IP rotation.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { CompleteIPRotationRequest request = CompleteIPRotationRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setName("name3373707") .build(); Operation response = clusterManagerClient.completeIPRotation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
completeIPRotationCallable
Completes master IP rotation.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 (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(); } -
setNodePoolSize
Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying [NodePool.locations][google.container.v1.NodePool.locations].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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetNodePoolSizeRequest request = SetNodePoolSizeRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setNodeCount(1539922066) .setName("name3373707") .build(); Operation response = clusterManagerClient.setNodePoolSize(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setNodePoolSizeCallable
Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying [NodePool.locations][google.container.v1.NodePool.locations].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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetNodePoolSizeRequest request = SetNodePoolSizeRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNodePoolId("nodePoolId1121557241") .setNodeCount(1539922066) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setNodePoolSizeCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setNetworkPolicy
Enables or disables Network Policy 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); Operation response = clusterManagerClient.setNetworkPolicy(name, networkPolicy); }- Parameters:
name- The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format `projects/*/locations/*/clusters/*`.networkPolicy- Required. Configuration options for the NetworkPolicy feature.- Throws:
ApiException- if the remote call fails
-
setNetworkPolicy
public final Operation setNetworkPolicy(String projectId, String zone, String clusterId, NetworkPolicy networkPolicy) Enables or disables Network Policy 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build(); Operation response = clusterManagerClient.setNetworkPolicy(projectId, zone, clusterId, networkPolicy); }- Parameters:
projectId- Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.zone- Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.clusterId- Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.networkPolicy- Required. Configuration options for the NetworkPolicy feature.- Throws:
ApiException- if the remote call fails
-
setNetworkPolicy
Enables or disables Network Policy 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetNetworkPolicyRequest request = SetNetworkPolicyRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNetworkPolicy(NetworkPolicy.newBuilder().build()) .setName("name3373707") .build(); Operation response = clusterManagerClient.setNetworkPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setNetworkPolicyCallable
Enables or disables Network Policy 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetNetworkPolicyRequest request = SetNetworkPolicyRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setNetworkPolicy(NetworkPolicy.newBuilder().build()) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setNetworkPolicyCallable().futureCall(request); // Do something. Operation response = future.get(); } -
setMaintenancePolicy
Sets the maintenance policy 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; MaintenancePolicy maintenancePolicy = MaintenancePolicy.newBuilder().build(); Operation response = clusterManagerClient.setMaintenancePolicy(name, maintenancePolicy); }- Parameters:
name- The name (project, location, cluster name) of the cluster to set maintenance policy. Specified in the format `projects/*/locations/*/clusters/*`.maintenancePolicy- Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.- Throws:
ApiException- if the remote call fails
-
setMaintenancePolicy
public final Operation setMaintenancePolicy(String projectId, String zone, String clusterId, MaintenancePolicy maintenancePolicy) Sets the maintenance policy 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = "projectId-894832108"; String zone = "zone3744684"; String clusterId = "clusterId561939637"; MaintenancePolicy maintenancePolicy = MaintenancePolicy.newBuilder().build(); Operation response = clusterManagerClient.setMaintenancePolicy(projectId, zone, clusterId, maintenancePolicy); }- Parameters:
projectId- Required. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).zone- Required. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides.clusterId- Required. The name of the cluster to update.maintenancePolicy- Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.- Throws:
ApiException- if the remote call fails
-
setMaintenancePolicy
Sets the maintenance policy 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetMaintenancePolicyRequest request = SetMaintenancePolicyRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setMaintenancePolicy(MaintenancePolicy.newBuilder().build()) .setName("name3373707") .build(); Operation response = clusterManagerClient.setMaintenancePolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setMaintenancePolicyCallable
Sets the maintenance policy 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { SetMaintenancePolicyRequest request = SetMaintenancePolicyRequest.newBuilder() .setProjectId("projectId-894832108") .setZone("zone3744684") .setClusterId("clusterId561939637") .setMaintenancePolicy(MaintenancePolicy.newBuilder().build()) .setName("name3373707") .build(); ApiFuture<Operation> future = clusterManagerClient.setMaintenancePolicyCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listUsableSubnetworks
public final ClusterManagerClient.ListUsableSubnetworksPagedResponse listUsableSubnetworks(ListUsableSubnetworksRequest request) Lists subnetworks that are usable for creating clusters in a project.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListUsableSubnetworksRequest request = ListUsableSubnetworksRequest.newBuilder() .setParent("parent-995424086") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (UsableSubnetwork element : clusterManagerClient.listUsableSubnetworks(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
-
listUsableSubnetworksPagedCallable
public final UnaryCallable<ListUsableSubnetworksRequest,ClusterManagerClient.ListUsableSubnetworksPagedResponse> listUsableSubnetworksPagedCallable()Lists subnetworks that are usable for creating clusters in a project.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListUsableSubnetworksRequest request = ListUsableSubnetworksRequest.newBuilder() .setParent("parent-995424086") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<UsableSubnetwork> future = clusterManagerClient.listUsableSubnetworksPagedCallable().futureCall(request); // Do something. for (UsableSubnetwork element : future.get().iterateAll()) { // doThingsWith(element); } } -
listUsableSubnetworksCallable
public final UnaryCallable<ListUsableSubnetworksRequest,ListUsableSubnetworksResponse> listUsableSubnetworksCallable()Lists subnetworks that are usable for creating clusters in a project.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { ListUsableSubnetworksRequest request = ListUsableSubnetworksRequest.newBuilder() .setParent("parent-995424086") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListUsableSubnetworksResponse response = clusterManagerClient.listUsableSubnetworksCallable().call(request); for (UsableSubnetwork element : response.getSubnetworksList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
checkAutopilotCompatibility
public final CheckAutopilotCompatibilityResponse checkAutopilotCompatibility(CheckAutopilotCompatibilityRequest request) Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { CheckAutopilotCompatibilityRequest request = CheckAutopilotCompatibilityRequest.newBuilder().setName("name3373707").build(); CheckAutopilotCompatibilityResponse response = clusterManagerClient.checkAutopilotCompatibility(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
checkAutopilotCompatibilityCallable
public final UnaryCallable<CheckAutopilotCompatibilityRequest,CheckAutopilotCompatibilityResponse> checkAutopilotCompatibilityCallable()Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { CheckAutopilotCompatibilityRequest request = CheckAutopilotCompatibilityRequest.newBuilder().setName("name3373707").build(); ApiFuture<CheckAutopilotCompatibilityResponse> future = clusterManagerClient.checkAutopilotCompatibilityCallable().futureCall(request); // Do something. CheckAutopilotCompatibilityResponse response = future.get(); } -
fetchClusterUpgradeInfo
Fetch upgrade information of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; ClusterUpgradeInfo response = clusterManagerClient.fetchClusterUpgradeInfo(name); }- Parameters:
name- Required. The name (project, location, cluster) of the cluster to get. Specified in the format `projects/*/locations/*/clusters/*` or `projects/*/zones/*/clusters/*`.- Throws:
ApiException- if the remote call fails
-
fetchClusterUpgradeInfo
Fetch upgrade information of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { FetchClusterUpgradeInfoRequest request = FetchClusterUpgradeInfoRequest.newBuilder() .setName("name3373707") .setVersion("version351608024") .build(); ClusterUpgradeInfo response = clusterManagerClient.fetchClusterUpgradeInfo(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
fetchClusterUpgradeInfoCallable
public final UnaryCallable<FetchClusterUpgradeInfoRequest,ClusterUpgradeInfo> fetchClusterUpgradeInfoCallable()Fetch upgrade information of a specific 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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { FetchClusterUpgradeInfoRequest request = FetchClusterUpgradeInfoRequest.newBuilder() .setName("name3373707") .setVersion("version351608024") .build(); ApiFuture<ClusterUpgradeInfo> future = clusterManagerClient.fetchClusterUpgradeInfoCallable().futureCall(request); // Do something. ClusterUpgradeInfo response = future.get(); } -
fetchNodePoolUpgradeInfo
Fetch upgrade information of a specific node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String name = "name3373707"; NodePoolUpgradeInfo response = clusterManagerClient.fetchNodePoolUpgradeInfo(name); }- Parameters:
name- Required. The name (project, location, cluster, node pool) of the node pool to get. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*` or `projects/*/zones/*/clusters/*/nodePools/*`.- Throws:
ApiException- if the remote call fails
-
fetchNodePoolUpgradeInfo
Fetch upgrade information of a specific node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { FetchNodePoolUpgradeInfoRequest request = FetchNodePoolUpgradeInfoRequest.newBuilder() .setName("name3373707") .setVersion("version351608024") .build(); NodePoolUpgradeInfo response = clusterManagerClient.fetchNodePoolUpgradeInfo(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
fetchNodePoolUpgradeInfoCallable
public final UnaryCallable<FetchNodePoolUpgradeInfoRequest,NodePoolUpgradeInfo> fetchNodePoolUpgradeInfoCallable()Fetch upgrade information of a specific node pool.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 (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { FetchNodePoolUpgradeInfoRequest request = FetchNodePoolUpgradeInfoRequest.newBuilder() .setName("name3373707") .setVersion("version351608024") .build(); ApiFuture<NodePoolUpgradeInfo> future = clusterManagerClient.fetchNodePoolUpgradeInfoCallable().futureCall(request); // Do something. NodePoolUpgradeInfo 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
-