@Override
      public Void invoke() throws AmbariException {
        String name = (String)properties.get(CLUSTER_NAME_PROPERTY_ID);

        if(StringUtils.isEmpty(name)){
          throw new IllegalArgumentException("Cluster Name cannot ne null or Empty");
        }

        if(remoteAmbariClusterDAO.findByName(name) != null){
          throw new DuplicateResourceException(String.format("Remote cluster with name %s already exists",name));
        }

        saveOrUpdateRemoteAmbariClusterEntity(properties,false);

        return null;
      }
Get the command to create the RemoteAmbariCluster
@param properties
@return A command to create the RemoteAmbariCluster
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java