2017-02-23 16 views
0

我需要加載可以在用於創建HDInsight羣集的模板中爲headnode和workernode設置的可能值的列表。有沒有可用於此的Java API?或者以其他方式獲取列表。此外,我無法找到任何描述模板參數列表或詳細信息的文檔。使用資源管理器模板創建HDInsight羣集時,列出headnode和workernode的允許值

e.g模板:

"computeProfile": { 
      "roles": [ 
      { 
       "name": "headnode", 
       "targetInstanceCount": "2", 
       "hardwareProfile": { 
       "vmSize": "Standard_D3" 
       }, 
       "osProfile": { 
       "linuxOperatingSystemProfile": { 
        "username": "[parameters('sshUserName')]", 
        "password": "[parameters('sshPassword')]" 
       } 
       } 
      }, 
      { 
       "name": "workernode", 
       "targetInstanceCount": "[parameters('clusterWorkerNodeCount')]", 
       "hardwareProfile": { 
       "vmSize": "Standard_D3" 
       }, 
       "osProfile": { 
       "linuxOperatingSystemProfile": { 
        "username": "[parameters('sshUserName')]", 
        "password": "[parameters('sshPassword')]" 
       } 
       } 
      } 
      ] 
     } 
     } 
    } 
    ], 

回答

0

沒有任何Java API(甚至REST API),它可以列出在模板headnode和workernode的可能值創建HDInsight羣集。

主題教程Authoring Azure Resource Manager templates的部分Parameters中顯示了唯一的線索。作爲元素的allowedValues屬性列出了所需的值,但不是ARM模板所必需的,如下所示。

enter image description here

因此,對於你的需求的唯一途徑是建立在Azure門戶複製這些值時,HDInsight實例,或收集從here約HDInsight所有exsiting模板顯示這些值。

希望它有幫助。

相關問題