public final Operation setMonitoringService(
      String projectId, String zone, String clusterId, String monitoringService) {

    SetMonitoringServiceRequest request =
        SetMonitoringServiceRequest.newBuilder()
            .setProjectId(projectId)
            .setZone(zone)
            .setClusterId(clusterId)
            .setMonitoringService(monitoringService)
            .build();
    return setMonitoringService(request);
  }
public final Operation setMonitoringService ( String projectId , String zone , String clusterId , String monitoringService ) { SetMonitoringServiceRequest request = SetMonitoringServiceRequest . newBuilder ( ) . setProjectId ( projectId ) . setZone ( zone ) . setClusterId ( clusterId ) . setMonitoringService ( monitoringService ) . build ( ) ; return setMonitoringService ( request ) ; }
Sets the monitoring service for a specific cluster.

<p>Sample code:

<pre><code>
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "";
String zone = "";
String clusterId = "";
String monitoringService = "";
Operation response = clusterManagerClient.setMonitoringService(projectId, zone, clusterId, monitoringService);
}
</code></pre>

@param projectId Deprecated. The Google Developers Console [project ID or project
number](https://support.google.com/cloud/answer/6158840). This field has been deprecated
and replaced by the name field.
@param zone Deprecated. The name of the Google Compute Engine
[zone](/compute/docs/zones#available) in which the cluster resides. This field has been
deprecated and replaced by the name field.
@param clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated
and replaced by the name field.
@param monitoringService The monitoring service the cluster should use to write metrics.
Currently available options:
<p>&#42; "monitoring.googleapis.com" - the Google Cloud Monitoring service &#42; "none" -
no metrics will be exported from the cluster
@throws com.google.api.gax.rpc.ApiException if the remote call fails