private ClusterRequest getRequest(Map<String, Object> properties) {
    SecurityType securityType;
    String requestedSecurityType = (String) properties.get(CLUSTER_SECURITY_TYPE_PROPERTY_ID);
    if(requestedSecurityType == null)
      securityType = null;
    else {
      try {
        securityType = SecurityType.valueOf(requestedSecurityType.toUpperCase());
      } catch (IllegalArgumentException e) {
        throw new IllegalArgumentException(String.format("Cannot set cluster security type to invalid value: %s", requestedSecurityType));
      }
    }

    ClusterRequest cr = new ClusterRequest(
        (Long) properties.get(CLUSTER_ID_PROPERTY_ID),
        (String) properties.get(CLUSTER_NAME_PROPERTY_ID),
        (String) properties.get(CLUSTER_PROVISIONING_STATE_PROPERTY_ID),
        securityType,
        (String) properties.get(CLUSTER_VERSION_PROPERTY_ID),
        null,
        getSessionAttributes(properties));

    List<ConfigurationRequest> configRequests = getConfigurationRequests(RESPONSE_KEY, properties);
    if (!configRequests.isEmpty()) {
      cr.setDesiredConfig(configRequests);
    }

    ServiceConfigVersionRequest serviceConfigVersionRequest = getServiceConfigVersionRequest(RESPONSE_KEY, properties);
    if (serviceConfigVersionRequest != null) {
      cr.setServiceConfigVersionRequest(serviceConfigVersionRequest);
    }

    return cr;
  }
Get a cluster request object from a map of property values.

@param properties  the predicate

@return the cluster request object
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java