2017-02-23 13 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模板显示这些值。

希望它有帮助。

相关问题