protected Long getClusterResourceId(String clusterName) throws AmbariException {
    Cluster cluster = (clusterName == null) ? null : managementController.getClusters().getCluster(clusterName);
    return (cluster == null) ? null : cluster.getResourceId();
  }
Gets the resource id for the named cluster

@param clusterName the name of the relevant cluster
@return the resource id or null if not found
@throws AmbariException if the named cluster does not exist
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java