@azure/arm-hdinsight 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/index.js +104 -14
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/applicationsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/applicationsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/applicationsCreateSample.js +63 -0
- package/dist-esm/samples-dev/applicationsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/applicationsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/applicationsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/applicationsDeleteSample.js +32 -0
- package/dist-esm/samples-dev/applicationsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/applicationsGetAzureAsyncOperationStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/applicationsGetAzureAsyncOperationStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/applicationsGetAzureAsyncOperationStatusSample.js +33 -0
- package/dist-esm/samples-dev/applicationsGetAzureAsyncOperationStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/applicationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/applicationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/applicationsGetSample.js +51 -0
- package/dist-esm/samples-dev/applicationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/applicationsListByClusterSample.d.ts +2 -0
- package/dist-esm/samples-dev/applicationsListByClusterSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/applicationsListByClusterSample.js +45 -0
- package/dist-esm/samples-dev/applicationsListByClusterSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersCreateSample.js +1201 -0
- package/dist-esm/samples-dev/clustersCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersDeleteSample.js +31 -0
- package/dist-esm/samples-dev/clustersDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersExecuteScriptActionsSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersExecuteScriptActionsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersExecuteScriptActionsSample.js +42 -0
- package/dist-esm/samples-dev/clustersExecuteScriptActionsSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersGetAzureAsyncOperationStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersGetAzureAsyncOperationStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersGetAzureAsyncOperationStatusSample.js +32 -0
- package/dist-esm/samples-dev/clustersGetAzureAsyncOperationStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersGetGatewaySettingsSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersGetGatewaySettingsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersGetGatewaySettingsSample.js +31 -0
- package/dist-esm/samples-dev/clustersGetGatewaySettingsSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersGetSample.js +49 -0
- package/dist-esm/samples-dev/clustersGetSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/clustersListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersListSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersListSample.js +43 -0
- package/dist-esm/samples-dev/clustersListSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersResizeSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersResizeSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersResizeSample.js +33 -0
- package/dist-esm/samples-dev/clustersResizeSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersRotateDiskEncryptionKeySample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersRotateDiskEncryptionKeySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersRotateDiskEncryptionKeySample.js +36 -0
- package/dist-esm/samples-dev/clustersRotateDiskEncryptionKeySample.js.map +1 -0
- package/dist-esm/samples-dev/clustersUpdateAutoScaleConfigurationSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersUpdateAutoScaleConfigurationSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersUpdateAutoScaleConfigurationSample.js +91 -0
- package/dist-esm/samples-dev/clustersUpdateAutoScaleConfigurationSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersUpdateGatewaySettingsSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersUpdateGatewaySettingsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersUpdateGatewaySettingsSample.js +36 -0
- package/dist-esm/samples-dev/clustersUpdateGatewaySettingsSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersUpdateIdentityCertificateSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersUpdateIdentityCertificateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersUpdateIdentityCertificateSample.js +36 -0
- package/dist-esm/samples-dev/clustersUpdateIdentityCertificateSample.js.map +1 -0
- package/dist-esm/samples-dev/clustersUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/clustersUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/clustersUpdateSample.js +34 -0
- package/dist-esm/samples-dev/clustersUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/configurationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/configurationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/configurationsGetSample.js +32 -0
- package/dist-esm/samples-dev/configurationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/configurationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/configurationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/configurationsListSample.js +31 -0
- package/dist-esm/samples-dev/configurationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/configurationsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/configurationsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/configurationsUpdateSample.js +59 -0
- package/dist-esm/samples-dev/configurationsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsCreateSample.js +36 -0
- package/dist-esm/samples-dev/extensionsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsDeleteSample.js +32 -0
- package/dist-esm/samples-dev/extensionsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsDisableAzureMonitorSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsDisableAzureMonitorSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsDisableAzureMonitorSample.js +31 -0
- package/dist-esm/samples-dev/extensionsDisableAzureMonitorSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsDisableMonitoringSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsDisableMonitoringSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsDisableMonitoringSample.js +31 -0
- package/dist-esm/samples-dev/extensionsDisableMonitoringSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsEnableAzureMonitorSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsEnableAzureMonitorSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsEnableAzureMonitorSample.js +35 -0
- package/dist-esm/samples-dev/extensionsEnableAzureMonitorSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsEnableMonitoringSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsEnableMonitoringSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsEnableMonitoringSample.js +35 -0
- package/dist-esm/samples-dev/extensionsEnableMonitoringSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsGetAzureAsyncOperationStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsGetAzureAsyncOperationStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsGetAzureAsyncOperationStatusSample.js +33 -0
- package/dist-esm/samples-dev/extensionsGetAzureAsyncOperationStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsGetAzureMonitorStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsGetAzureMonitorStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsGetAzureMonitorStatusSample.js +31 -0
- package/dist-esm/samples-dev/extensionsGetAzureMonitorStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsGetMonitoringStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsGetMonitoringStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsGetMonitoringStatusSample.js +31 -0
- package/dist-esm/samples-dev/extensionsGetMonitoringStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/extensionsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/extensionsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/extensionsGetSample.js +32 -0
- package/dist-esm/samples-dev/extensionsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.d.ts +2 -0
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.js +34 -0
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.js.map +1 -0
- package/dist-esm/samples-dev/locationsGetAzureAsyncOperationStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/locationsGetAzureAsyncOperationStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationsGetAzureAsyncOperationStatusSample.js +31 -0
- package/dist-esm/samples-dev/locationsGetAzureAsyncOperationStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/locationsGetCapabilitiesSample.d.ts +2 -0
- package/dist-esm/samples-dev/locationsGetCapabilitiesSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationsGetCapabilitiesSample.js +30 -0
- package/dist-esm/samples-dev/locationsGetCapabilitiesSample.js.map +1 -0
- package/dist-esm/samples-dev/locationsListBillingSpecsSample.d.ts +2 -0
- package/dist-esm/samples-dev/locationsListBillingSpecsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationsListBillingSpecsSample.js +30 -0
- package/dist-esm/samples-dev/locationsListBillingSpecsSample.js.map +1 -0
- package/dist-esm/samples-dev/locationsListUsagesSample.d.ts +2 -0
- package/dist-esm/samples-dev/locationsListUsagesSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationsListUsagesSample.js +30 -0
- package/dist-esm/samples-dev/locationsListUsagesSample.js.map +1 -0
- package/dist-esm/samples-dev/locationsValidateClusterCreateRequestSample.d.ts +2 -0
- package/dist-esm/samples-dev/locationsValidateClusterCreateRequestSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationsValidateClusterCreateRequestSample.js +117 -0
- package/dist-esm/samples-dev/locationsValidateClusterCreateRequestSample.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +39 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +32 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +32 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsListByClusterSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsListByClusterSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsListByClusterSample.js +45 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsListByClusterSample.js.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +32 -0
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.d.ts +2 -0
- package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js +31 -0
- package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js.map +1 -0
- package/dist-esm/samples-dev/scriptActionsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/scriptActionsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/scriptActionsDeleteSample.js +32 -0
- package/dist-esm/samples-dev/scriptActionsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/scriptActionsGetExecutionAsyncOperationStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/scriptActionsGetExecutionAsyncOperationStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/scriptActionsGetExecutionAsyncOperationStatusSample.js +32 -0
- package/dist-esm/samples-dev/scriptActionsGetExecutionAsyncOperationStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/scriptActionsGetExecutionDetailSample.d.ts +2 -0
- package/dist-esm/samples-dev/scriptActionsGetExecutionDetailSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/scriptActionsGetExecutionDetailSample.js +32 -0
- package/dist-esm/samples-dev/scriptActionsGetExecutionDetailSample.js.map +1 -0
- package/dist-esm/samples-dev/scriptActionsListByClusterSample.d.ts +2 -0
- package/dist-esm/samples-dev/scriptActionsListByClusterSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/scriptActionsListByClusterSample.js +45 -0
- package/dist-esm/samples-dev/scriptActionsListByClusterSample.js.map +1 -0
- package/dist-esm/samples-dev/scriptExecutionHistoryListByClusterSample.d.ts +2 -0
- package/dist-esm/samples-dev/scriptExecutionHistoryListByClusterSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/scriptExecutionHistoryListByClusterSample.js +45 -0
- package/dist-esm/samples-dev/scriptExecutionHistoryListByClusterSample.js.map +1 -0
- package/dist-esm/samples-dev/scriptExecutionHistoryPromoteSample.d.ts +2 -0
- package/dist-esm/samples-dev/scriptExecutionHistoryPromoteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/scriptExecutionHistoryPromoteSample.js +32 -0
- package/dist-esm/samples-dev/scriptExecutionHistoryPromoteSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesGetAsyncOperationStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesGetAsyncOperationStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesGetAsyncOperationStatusSample.js +32 -0
- package/dist-esm/samples-dev/virtualMachinesGetAsyncOperationStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesListHostsSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesListHostsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesListHostsSample.js +31 -0
- package/dist-esm/samples-dev/virtualMachinesListHostsSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesRestartHostsSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesRestartHostsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesRestartHostsSample.js +32 -0
- package/dist-esm/samples-dev/virtualMachinesRestartHostsSample.js.map +1 -0
- package/dist-esm/src/hDInsightManagementClient.d.ts +2 -0
- package/dist-esm/src/hDInsightManagementClient.d.ts.map +1 -1
- package/dist-esm/src/hDInsightManagementClient.js +47 -13
- package/dist-esm/src/hDInsightManagementClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +73 -15
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +57 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +20 -9
- package/review/arm-hdinsight.api.md +30 -86
- package/src/hDInsightManagementClient.ts +57 -16
- package/src/models/index.ts +73 -15
- package/tsconfig.json +8 -2
- package/types/arm-hdinsight.d.ts +75 -15
|
@@ -0,0 +1,1201 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { HDInsightManagementClient } from "@azure/arm-hdinsight";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
15
|
+
*
|
|
16
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
17
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAutoscaleConfig.json
|
|
18
|
+
*/
|
|
19
|
+
function createHdInsightClusterWithAutoscaleConfiguration() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "subid";
|
|
22
|
+
const resourceGroupName = "rg1";
|
|
23
|
+
const clusterName = "cluster1";
|
|
24
|
+
const parameters = {
|
|
25
|
+
properties: {
|
|
26
|
+
clusterDefinition: {
|
|
27
|
+
componentVersion: { hadoop: "2.7" },
|
|
28
|
+
configurations: {
|
|
29
|
+
gateway: {
|
|
30
|
+
"restAuthCredential.isEnabled": true,
|
|
31
|
+
"restAuthCredential.password": "**********",
|
|
32
|
+
"restAuthCredential.username": "admin"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
kind: "hadoop"
|
|
36
|
+
},
|
|
37
|
+
clusterVersion: "3.6",
|
|
38
|
+
computeProfile: {
|
|
39
|
+
roles: [
|
|
40
|
+
{
|
|
41
|
+
name: "workernode",
|
|
42
|
+
autoscaleConfiguration: {
|
|
43
|
+
capacity: {},
|
|
44
|
+
recurrence: {
|
|
45
|
+
schedule: [
|
|
46
|
+
{
|
|
47
|
+
days: [
|
|
48
|
+
"Monday",
|
|
49
|
+
"Tuesday",
|
|
50
|
+
"Wednesday",
|
|
51
|
+
"Thursday",
|
|
52
|
+
"Friday"
|
|
53
|
+
],
|
|
54
|
+
timeAndCapacity: {
|
|
55
|
+
maxInstanceCount: 3,
|
|
56
|
+
minInstanceCount: 3,
|
|
57
|
+
time: "09:00"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
days: [
|
|
62
|
+
"Monday",
|
|
63
|
+
"Tuesday",
|
|
64
|
+
"Wednesday",
|
|
65
|
+
"Thursday",
|
|
66
|
+
"Friday"
|
|
67
|
+
],
|
|
68
|
+
timeAndCapacity: {
|
|
69
|
+
maxInstanceCount: 6,
|
|
70
|
+
minInstanceCount: 6,
|
|
71
|
+
time: "18:00"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
days: ["Saturday", "Sunday"],
|
|
76
|
+
timeAndCapacity: {
|
|
77
|
+
maxInstanceCount: 2,
|
|
78
|
+
minInstanceCount: 2,
|
|
79
|
+
time: "09:00"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
days: ["Saturday", "Sunday"],
|
|
84
|
+
timeAndCapacity: {
|
|
85
|
+
maxInstanceCount: 4,
|
|
86
|
+
minInstanceCount: 4,
|
|
87
|
+
time: "18:00"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
timeZone: "China Standard Time"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
dataDisksGroups: [],
|
|
95
|
+
hardwareProfile: { vmSize: "Standard_D4_V2" },
|
|
96
|
+
osProfile: {
|
|
97
|
+
linuxOperatingSystemProfile: {
|
|
98
|
+
password: "**********",
|
|
99
|
+
username: "sshuser"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
scriptActions: [],
|
|
103
|
+
targetInstanceCount: 4,
|
|
104
|
+
virtualNetworkProfile: {}
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
osType: "Linux",
|
|
109
|
+
storageProfile: {
|
|
110
|
+
storageaccounts: [
|
|
111
|
+
{
|
|
112
|
+
name: "mystorage.blob.core.windows.net",
|
|
113
|
+
container: "hdinsight-autoscale-tes-2019-06-18t05-49-16-591z",
|
|
114
|
+
isDefault: true,
|
|
115
|
+
key: "storagekey"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
tier: "Standard"
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const credential = new DefaultAzureCredential();
|
|
123
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
124
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
125
|
+
console.log(result);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
createHdInsightClusterWithAutoscaleConfiguration().catch(console.error);
|
|
129
|
+
/**
|
|
130
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
131
|
+
*
|
|
132
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
133
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopAdlsGen2.json
|
|
134
|
+
*/
|
|
135
|
+
function createHadoopClusterWithAzureDataLakeStorageGen2() {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const subscriptionId = "subid";
|
|
138
|
+
const resourceGroupName = "rg1";
|
|
139
|
+
const clusterName = "cluster1";
|
|
140
|
+
const parameters = {
|
|
141
|
+
properties: {
|
|
142
|
+
clusterDefinition: {
|
|
143
|
+
configurations: {
|
|
144
|
+
gateway: {
|
|
145
|
+
"restAuthCredential.isEnabled": "true",
|
|
146
|
+
"restAuthCredential.password": "**********",
|
|
147
|
+
"restAuthCredential.username": "admin"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
kind: "Hadoop"
|
|
151
|
+
},
|
|
152
|
+
clusterVersion: "3.6",
|
|
153
|
+
computeProfile: {
|
|
154
|
+
roles: [
|
|
155
|
+
{
|
|
156
|
+
name: "headnode",
|
|
157
|
+
hardwareProfile: { vmSize: "Standard_D3_V2" },
|
|
158
|
+
minInstanceCount: 1,
|
|
159
|
+
osProfile: {
|
|
160
|
+
linuxOperatingSystemProfile: {
|
|
161
|
+
password: "**********",
|
|
162
|
+
username: "sshuser"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
targetInstanceCount: 2
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "workernode",
|
|
169
|
+
hardwareProfile: { vmSize: "Standard_D3_V2" },
|
|
170
|
+
minInstanceCount: 1,
|
|
171
|
+
osProfile: {
|
|
172
|
+
linuxOperatingSystemProfile: {
|
|
173
|
+
password: "**********",
|
|
174
|
+
username: "sshuser"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
targetInstanceCount: 4
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "zookeepernode",
|
|
181
|
+
hardwareProfile: { vmSize: "Small" },
|
|
182
|
+
minInstanceCount: 1,
|
|
183
|
+
osProfile: {
|
|
184
|
+
linuxOperatingSystemProfile: {
|
|
185
|
+
password: "**********",
|
|
186
|
+
username: "sshuser"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
targetInstanceCount: 3
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
osType: "Linux",
|
|
194
|
+
storageProfile: {
|
|
195
|
+
storageaccounts: [
|
|
196
|
+
{
|
|
197
|
+
name: "mystorage.dfs.core.windows.net",
|
|
198
|
+
fileSystem: "default",
|
|
199
|
+
isDefault: true,
|
|
200
|
+
key: "storagekey"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
tier: "Standard"
|
|
205
|
+
},
|
|
206
|
+
tags: { key1: "val1" }
|
|
207
|
+
};
|
|
208
|
+
const credential = new DefaultAzureCredential();
|
|
209
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
210
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
211
|
+
console.log(result);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
createHadoopClusterWithAzureDataLakeStorageGen2().catch(console.error);
|
|
215
|
+
/**
|
|
216
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
217
|
+
*
|
|
218
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
219
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPassword.json
|
|
220
|
+
*/
|
|
221
|
+
function createHadoopOnLinuxClusterWithSshPassword() {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
const subscriptionId = "subid";
|
|
224
|
+
const resourceGroupName = "rg1";
|
|
225
|
+
const clusterName = "cluster1";
|
|
226
|
+
const parameters = {
|
|
227
|
+
properties: {
|
|
228
|
+
clusterDefinition: {
|
|
229
|
+
configurations: {
|
|
230
|
+
gateway: {
|
|
231
|
+
"restAuthCredential.isEnabled": "true",
|
|
232
|
+
"restAuthCredential.password": "**********",
|
|
233
|
+
"restAuthCredential.username": "admin"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
kind: "Hadoop"
|
|
237
|
+
},
|
|
238
|
+
clusterVersion: "3.5",
|
|
239
|
+
computeProfile: {
|
|
240
|
+
roles: [
|
|
241
|
+
{
|
|
242
|
+
name: "headnode",
|
|
243
|
+
hardwareProfile: { vmSize: "Standard_D3_V2" },
|
|
244
|
+
minInstanceCount: 1,
|
|
245
|
+
osProfile: {
|
|
246
|
+
linuxOperatingSystemProfile: {
|
|
247
|
+
password: "**********",
|
|
248
|
+
username: "sshuser"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
targetInstanceCount: 2
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: "workernode",
|
|
255
|
+
hardwareProfile: { vmSize: "Standard_D3_V2" },
|
|
256
|
+
minInstanceCount: 1,
|
|
257
|
+
osProfile: {
|
|
258
|
+
linuxOperatingSystemProfile: {
|
|
259
|
+
password: "**********",
|
|
260
|
+
username: "sshuser"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
targetInstanceCount: 4
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "zookeepernode",
|
|
267
|
+
hardwareProfile: { vmSize: "Small" },
|
|
268
|
+
minInstanceCount: 1,
|
|
269
|
+
osProfile: {
|
|
270
|
+
linuxOperatingSystemProfile: {
|
|
271
|
+
password: "**********",
|
|
272
|
+
username: "sshuser"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
targetInstanceCount: 3
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
osType: "Linux",
|
|
280
|
+
storageProfile: {
|
|
281
|
+
storageaccounts: [
|
|
282
|
+
{
|
|
283
|
+
name: "mystorage.blob.core.windows.net",
|
|
284
|
+
container: "containername",
|
|
285
|
+
isDefault: true,
|
|
286
|
+
key: "storagekey"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
tier: "Standard"
|
|
291
|
+
},
|
|
292
|
+
tags: { key1: "val1" }
|
|
293
|
+
};
|
|
294
|
+
const credential = new DefaultAzureCredential();
|
|
295
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
296
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
297
|
+
console.log(result);
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
createHadoopOnLinuxClusterWithSshPassword().catch(console.error);
|
|
301
|
+
/**
|
|
302
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
303
|
+
*
|
|
304
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
305
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPublicKey.json
|
|
306
|
+
*/
|
|
307
|
+
function createHadoopOnLinuxClusterWithSshPublicKey() {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
+
const subscriptionId = "subid";
|
|
310
|
+
const resourceGroupName = "rg1";
|
|
311
|
+
const clusterName = "cluster1";
|
|
312
|
+
const parameters = {
|
|
313
|
+
properties: {
|
|
314
|
+
clusterDefinition: {
|
|
315
|
+
configurations: {
|
|
316
|
+
gateway: {
|
|
317
|
+
"restAuthCredential.isEnabled": true,
|
|
318
|
+
"restAuthCredential.password": "**********",
|
|
319
|
+
"restAuthCredential.username": "admin"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
kind: "Hadoop"
|
|
323
|
+
},
|
|
324
|
+
clusterVersion: "3.5",
|
|
325
|
+
computeProfile: {
|
|
326
|
+
roles: [
|
|
327
|
+
{
|
|
328
|
+
name: "headnode",
|
|
329
|
+
hardwareProfile: { vmSize: "Standard_D3_V2" },
|
|
330
|
+
minInstanceCount: 1,
|
|
331
|
+
osProfile: {
|
|
332
|
+
linuxOperatingSystemProfile: {
|
|
333
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
334
|
+
username: "sshuser"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
targetInstanceCount: 2
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: "workernode",
|
|
341
|
+
hardwareProfile: { vmSize: "Standard_D3_V2" },
|
|
342
|
+
minInstanceCount: 1,
|
|
343
|
+
osProfile: {
|
|
344
|
+
linuxOperatingSystemProfile: {
|
|
345
|
+
password: "**********",
|
|
346
|
+
username: "sshuser"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
targetInstanceCount: 4
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: "zookeepernode",
|
|
353
|
+
hardwareProfile: { vmSize: "Small" },
|
|
354
|
+
minInstanceCount: 1,
|
|
355
|
+
osProfile: {
|
|
356
|
+
linuxOperatingSystemProfile: {
|
|
357
|
+
password: "**********",
|
|
358
|
+
username: "sshuser"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
targetInstanceCount: 3
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
osType: "Linux",
|
|
366
|
+
storageProfile: {
|
|
367
|
+
storageaccounts: [
|
|
368
|
+
{
|
|
369
|
+
name: "mystorage.blob.core.windows.net",
|
|
370
|
+
container: "containername",
|
|
371
|
+
isDefault: true,
|
|
372
|
+
key: "storagekey"
|
|
373
|
+
}
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
tier: "Standard"
|
|
377
|
+
},
|
|
378
|
+
tags: { key1: "val1" }
|
|
379
|
+
};
|
|
380
|
+
const credential = new DefaultAzureCredential();
|
|
381
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
382
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
383
|
+
console.log(result);
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
createHadoopOnLinuxClusterWithSshPublicKey().catch(console.error);
|
|
387
|
+
/**
|
|
388
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
389
|
+
*
|
|
390
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
391
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateKafkaClusterWithKafkaRestProxy.json
|
|
392
|
+
*/
|
|
393
|
+
function createKafkaClusterWithKafkaRestProxy() {
|
|
394
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
395
|
+
const subscriptionId = "subid";
|
|
396
|
+
const resourceGroupName = "rg1";
|
|
397
|
+
const clusterName = "cluster1";
|
|
398
|
+
const parameters = {
|
|
399
|
+
properties: {
|
|
400
|
+
clusterDefinition: {
|
|
401
|
+
componentVersion: { kafka: "2.1" },
|
|
402
|
+
configurations: {
|
|
403
|
+
gateway: {
|
|
404
|
+
"restAuthCredential.isEnabled": true,
|
|
405
|
+
"restAuthCredential.password": "**********",
|
|
406
|
+
"restAuthCredential.username": "admin"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
kind: "kafka"
|
|
410
|
+
},
|
|
411
|
+
clusterVersion: "4.0",
|
|
412
|
+
computeProfile: {
|
|
413
|
+
roles: [
|
|
414
|
+
{
|
|
415
|
+
name: "headnode",
|
|
416
|
+
hardwareProfile: { vmSize: "Large" },
|
|
417
|
+
osProfile: {
|
|
418
|
+
linuxOperatingSystemProfile: {
|
|
419
|
+
password: "**********",
|
|
420
|
+
username: "sshuser"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
targetInstanceCount: 2
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
name: "workernode",
|
|
427
|
+
dataDisksGroups: [{ disksPerNode: 8 }],
|
|
428
|
+
hardwareProfile: { vmSize: "Large" },
|
|
429
|
+
osProfile: {
|
|
430
|
+
linuxOperatingSystemProfile: {
|
|
431
|
+
password: "**********",
|
|
432
|
+
username: "sshuser"
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
targetInstanceCount: 3
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: "zookeepernode",
|
|
439
|
+
hardwareProfile: { vmSize: "Small" },
|
|
440
|
+
osProfile: {
|
|
441
|
+
linuxOperatingSystemProfile: {
|
|
442
|
+
password: "**********",
|
|
443
|
+
username: "sshuser"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
targetInstanceCount: 3
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
name: "kafkamanagementnode",
|
|
450
|
+
hardwareProfile: { vmSize: "Standard_D4_v2" },
|
|
451
|
+
osProfile: {
|
|
452
|
+
linuxOperatingSystemProfile: {
|
|
453
|
+
password: "**********",
|
|
454
|
+
username: "kafkauser"
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
targetInstanceCount: 2
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
},
|
|
461
|
+
kafkaRestProperties: {
|
|
462
|
+
clientGroupInfo: {
|
|
463
|
+
groupId: "00000000-0000-0000-0000-111111111111",
|
|
464
|
+
groupName: "Kafka security group name"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
osType: "Linux",
|
|
468
|
+
storageProfile: {
|
|
469
|
+
storageaccounts: [
|
|
470
|
+
{
|
|
471
|
+
name: "mystorage.blob.core.windows.net",
|
|
472
|
+
container: "containername",
|
|
473
|
+
isDefault: true,
|
|
474
|
+
key: "storagekey"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
tier: "Standard"
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
const credential = new DefaultAzureCredential();
|
|
482
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
483
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
484
|
+
console.log(result);
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
createKafkaClusterWithKafkaRestProxy().catch(console.error);
|
|
488
|
+
/**
|
|
489
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
490
|
+
*
|
|
491
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
492
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSecureHadoop.json
|
|
493
|
+
*/
|
|
494
|
+
function createSecureHadoopCluster() {
|
|
495
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
496
|
+
const subscriptionId = "subid";
|
|
497
|
+
const resourceGroupName = "rg1";
|
|
498
|
+
const clusterName = "cluster1";
|
|
499
|
+
const parameters = {
|
|
500
|
+
properties: {
|
|
501
|
+
clusterDefinition: {
|
|
502
|
+
configurations: {
|
|
503
|
+
gateway: {
|
|
504
|
+
"restAuthCredential.isEnabled": true,
|
|
505
|
+
"restAuthCredential.password": "**********",
|
|
506
|
+
"restAuthCredential.username": "admin"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
kind: "Hadoop"
|
|
510
|
+
},
|
|
511
|
+
clusterVersion: "3.5",
|
|
512
|
+
computeProfile: {
|
|
513
|
+
roles: [
|
|
514
|
+
{
|
|
515
|
+
name: "headnode",
|
|
516
|
+
hardwareProfile: { vmSize: "Standard_D3_V2" },
|
|
517
|
+
minInstanceCount: 1,
|
|
518
|
+
osProfile: {
|
|
519
|
+
linuxOperatingSystemProfile: {
|
|
520
|
+
password: "**********",
|
|
521
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
522
|
+
username: "sshuser"
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
scriptActions: [],
|
|
526
|
+
targetInstanceCount: 2,
|
|
527
|
+
virtualNetworkProfile: {
|
|
528
|
+
id: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname",
|
|
529
|
+
subnet: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
name: "workernode",
|
|
534
|
+
hardwareProfile: { vmSize: "Standard_D3_V2" },
|
|
535
|
+
minInstanceCount: 1,
|
|
536
|
+
osProfile: {
|
|
537
|
+
linuxOperatingSystemProfile: {
|
|
538
|
+
password: "**********",
|
|
539
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
540
|
+
username: "sshuser"
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
scriptActions: [],
|
|
544
|
+
targetInstanceCount: 4,
|
|
545
|
+
virtualNetworkProfile: {
|
|
546
|
+
id: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname",
|
|
547
|
+
subnet: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
name: "zookeepernode",
|
|
552
|
+
hardwareProfile: { vmSize: "Small" },
|
|
553
|
+
minInstanceCount: 1,
|
|
554
|
+
osProfile: {
|
|
555
|
+
linuxOperatingSystemProfile: {
|
|
556
|
+
password: "**********",
|
|
557
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
558
|
+
username: "sshuser"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
scriptActions: [],
|
|
562
|
+
targetInstanceCount: 3,
|
|
563
|
+
virtualNetworkProfile: {
|
|
564
|
+
id: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname",
|
|
565
|
+
subnet: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
osType: "Linux",
|
|
571
|
+
securityProfile: {
|
|
572
|
+
clusterUsersGroupDNs: ["hdiusers"],
|
|
573
|
+
directoryType: "ActiveDirectory",
|
|
574
|
+
domain: "DomainName",
|
|
575
|
+
domainUserPassword: "**********",
|
|
576
|
+
domainUsername: "DomainUsername",
|
|
577
|
+
ldapsUrls: ["ldaps://10.10.0.4:636"],
|
|
578
|
+
organizationalUnitDN: "OU=Hadoop,DC=hdinsight,DC=test"
|
|
579
|
+
},
|
|
580
|
+
storageProfile: {
|
|
581
|
+
storageaccounts: [
|
|
582
|
+
{
|
|
583
|
+
name: "mystorage.blob.core.windows.net",
|
|
584
|
+
container: "containername",
|
|
585
|
+
isDefault: true,
|
|
586
|
+
key: "storage account key"
|
|
587
|
+
}
|
|
588
|
+
]
|
|
589
|
+
},
|
|
590
|
+
tier: "Premium"
|
|
591
|
+
},
|
|
592
|
+
tags: { key1: "val1" }
|
|
593
|
+
};
|
|
594
|
+
const credential = new DefaultAzureCredential();
|
|
595
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
596
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
597
|
+
console.log(result);
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
createSecureHadoopCluster().catch(console.error);
|
|
601
|
+
/**
|
|
602
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
603
|
+
*
|
|
604
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
605
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxSparkSshPassword.json
|
|
606
|
+
*/
|
|
607
|
+
function createSparkOnLinuxClusterWithSshPassword() {
|
|
608
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
609
|
+
const subscriptionId = "subid";
|
|
610
|
+
const resourceGroupName = "rg1";
|
|
611
|
+
const clusterName = "cluster1";
|
|
612
|
+
const parameters = {
|
|
613
|
+
properties: {
|
|
614
|
+
clusterDefinition: {
|
|
615
|
+
componentVersion: { spark: "2.0" },
|
|
616
|
+
configurations: {
|
|
617
|
+
gateway: {
|
|
618
|
+
"restAuthCredential.isEnabled": true,
|
|
619
|
+
"restAuthCredential.password": "**********",
|
|
620
|
+
"restAuthCredential.username": "admin"
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
kind: "Spark"
|
|
624
|
+
},
|
|
625
|
+
clusterVersion: "3.5",
|
|
626
|
+
computeProfile: {
|
|
627
|
+
roles: [
|
|
628
|
+
{
|
|
629
|
+
name: "headnode",
|
|
630
|
+
hardwareProfile: { vmSize: "Standard_D12_V2" },
|
|
631
|
+
minInstanceCount: 1,
|
|
632
|
+
osProfile: {
|
|
633
|
+
linuxOperatingSystemProfile: {
|
|
634
|
+
password: "**********",
|
|
635
|
+
username: "sshuser"
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
targetInstanceCount: 2
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
name: "workernode",
|
|
642
|
+
hardwareProfile: { vmSize: "Standard_D4_V2" },
|
|
643
|
+
minInstanceCount: 1,
|
|
644
|
+
osProfile: {
|
|
645
|
+
linuxOperatingSystemProfile: {
|
|
646
|
+
password: "**********",
|
|
647
|
+
username: "sshuser"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
targetInstanceCount: 4
|
|
651
|
+
}
|
|
652
|
+
]
|
|
653
|
+
},
|
|
654
|
+
osType: "Linux",
|
|
655
|
+
storageProfile: {
|
|
656
|
+
storageaccounts: [
|
|
657
|
+
{
|
|
658
|
+
name: "mystorage.blob.core.windows.net",
|
|
659
|
+
container: "containername",
|
|
660
|
+
isDefault: true,
|
|
661
|
+
key: "storageapikey*"
|
|
662
|
+
}
|
|
663
|
+
]
|
|
664
|
+
},
|
|
665
|
+
tier: "Standard"
|
|
666
|
+
},
|
|
667
|
+
tags: { key1: "val1" }
|
|
668
|
+
};
|
|
669
|
+
const credential = new DefaultAzureCredential();
|
|
670
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
671
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
672
|
+
console.log(result);
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
createSparkOnLinuxClusterWithSshPassword().catch(console.error);
|
|
676
|
+
/**
|
|
677
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
678
|
+
*
|
|
679
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
680
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithTLS12.json
|
|
681
|
+
*/
|
|
682
|
+
function createClusterWithTls12() {
|
|
683
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
684
|
+
const subscriptionId = "subid";
|
|
685
|
+
const resourceGroupName = "rg1";
|
|
686
|
+
const clusterName = "cluster1";
|
|
687
|
+
const parameters = {
|
|
688
|
+
properties: {
|
|
689
|
+
clusterDefinition: {
|
|
690
|
+
configurations: {
|
|
691
|
+
gateway: {
|
|
692
|
+
"restAuthCredential.isEnabled": true,
|
|
693
|
+
"restAuthCredential.password": "**********",
|
|
694
|
+
"restAuthCredential.username": "admin"
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
kind: "Hadoop"
|
|
698
|
+
},
|
|
699
|
+
clusterVersion: "3.6",
|
|
700
|
+
computeProfile: {
|
|
701
|
+
roles: [
|
|
702
|
+
{
|
|
703
|
+
name: "headnode",
|
|
704
|
+
hardwareProfile: { vmSize: "Large" },
|
|
705
|
+
osProfile: {
|
|
706
|
+
linuxOperatingSystemProfile: {
|
|
707
|
+
password: "**********",
|
|
708
|
+
username: "sshuser"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
targetInstanceCount: 2
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
name: "workernode",
|
|
715
|
+
hardwareProfile: { vmSize: "Large" },
|
|
716
|
+
osProfile: {
|
|
717
|
+
linuxOperatingSystemProfile: {
|
|
718
|
+
password: "**********",
|
|
719
|
+
username: "sshuser"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
targetInstanceCount: 3
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
name: "zookeepernode",
|
|
726
|
+
hardwareProfile: { vmSize: "Small" },
|
|
727
|
+
osProfile: {
|
|
728
|
+
linuxOperatingSystemProfile: {
|
|
729
|
+
password: "**********",
|
|
730
|
+
username: "sshuser"
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
targetInstanceCount: 3
|
|
734
|
+
}
|
|
735
|
+
]
|
|
736
|
+
},
|
|
737
|
+
minSupportedTlsVersion: "1.2",
|
|
738
|
+
osType: "Linux",
|
|
739
|
+
storageProfile: {
|
|
740
|
+
storageaccounts: [
|
|
741
|
+
{
|
|
742
|
+
name: "mystorage.blob.core.windows.net",
|
|
743
|
+
container: "default8525",
|
|
744
|
+
isDefault: true,
|
|
745
|
+
key: "storagekey"
|
|
746
|
+
}
|
|
747
|
+
]
|
|
748
|
+
},
|
|
749
|
+
tier: "Standard"
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
const credential = new DefaultAzureCredential();
|
|
753
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
754
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
755
|
+
console.log(result);
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
createClusterWithTls12().catch(console.error);
|
|
759
|
+
/**
|
|
760
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
761
|
+
*
|
|
762
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
763
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAvailabilityZones.json
|
|
764
|
+
*/
|
|
765
|
+
function createClusterWithAvailabilityZones() {
|
|
766
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
767
|
+
const subscriptionId = "subId";
|
|
768
|
+
const resourceGroupName = "rg1";
|
|
769
|
+
const clusterName = "cluster1";
|
|
770
|
+
const parameters = {
|
|
771
|
+
properties: {
|
|
772
|
+
clusterDefinition: {
|
|
773
|
+
configurations: {
|
|
774
|
+
"ambari-conf": {
|
|
775
|
+
"database-name": "{ambari database name}",
|
|
776
|
+
"database-server": "{sql server name}.database.windows.net",
|
|
777
|
+
"database-user-name": "**********",
|
|
778
|
+
"database-user-password": "**********"
|
|
779
|
+
},
|
|
780
|
+
gateway: {
|
|
781
|
+
"restAuthCredential.isEnabled": true,
|
|
782
|
+
"restAuthCredential.password": "**********",
|
|
783
|
+
"restAuthCredential.username": "admin"
|
|
784
|
+
},
|
|
785
|
+
"hive-env": {
|
|
786
|
+
hive_database: "Existing MSSQL Server database with SQL authentication",
|
|
787
|
+
hive_database_name: "{hive metastore name}",
|
|
788
|
+
hive_database_type: "mssql",
|
|
789
|
+
hive_existing_mssql_server_database: "{hive metastore name}",
|
|
790
|
+
hive_existing_mssql_server_host: "{sql server name}.database.windows.net",
|
|
791
|
+
hive_hostname: "{sql server name}.database.windows.net"
|
|
792
|
+
},
|
|
793
|
+
"hive-site": {
|
|
794
|
+
"javax.jdo.option.ConnectionDriverName": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
|
|
795
|
+
"javax.jdo.option.ConnectionPassword": "**********!",
|
|
796
|
+
"javax.jdo.option.ConnectionURL": "jdbc:sqlserver://{sql server name}.database.windows.net;database={hive metastore name};encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300;sendStringParametersAsUnicode=true;prepareSQL=0",
|
|
797
|
+
"javax.jdo.option.ConnectionUserName": "**********"
|
|
798
|
+
},
|
|
799
|
+
"oozie-env": {
|
|
800
|
+
oozie_database: "Existing MSSQL Server database with SQL authentication",
|
|
801
|
+
oozie_database_name: "{oozie metastore name}",
|
|
802
|
+
oozie_database_type: "mssql",
|
|
803
|
+
oozie_existing_mssql_server_database: "{oozie metastore name}",
|
|
804
|
+
oozie_existing_mssql_server_host: "{sql server name}.database.windows.net",
|
|
805
|
+
oozie_hostname: "{sql server name}.database.windows.net"
|
|
806
|
+
},
|
|
807
|
+
"oozie-site": {
|
|
808
|
+
"oozie.db.schema.name": "oozie",
|
|
809
|
+
"oozie.service.JPAService.jdbc.driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
|
|
810
|
+
"oozie.service.JPAService.jdbc.password": "**********",
|
|
811
|
+
"oozie.service.JPAService.jdbc.url": "jdbc:sqlserver://{sql server name}.database.windows.net;database={oozie metastore name};encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300;sendStringParametersAsUnicode=true;prepareSQL=0",
|
|
812
|
+
"oozie.service.JPAService.jdbc.username": "**********"
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
kind: "hadoop"
|
|
816
|
+
},
|
|
817
|
+
clusterVersion: "3.6",
|
|
818
|
+
computeProfile: {
|
|
819
|
+
roles: [
|
|
820
|
+
{
|
|
821
|
+
name: "headnode",
|
|
822
|
+
hardwareProfile: { vmSize: "standard_d3" },
|
|
823
|
+
osProfile: {
|
|
824
|
+
linuxOperatingSystemProfile: {
|
|
825
|
+
password: "**********",
|
|
826
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
827
|
+
username: "sshuser"
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
targetInstanceCount: 2,
|
|
831
|
+
virtualNetworkProfile: {
|
|
832
|
+
id: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname",
|
|
833
|
+
subnet: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
name: "workernode",
|
|
838
|
+
hardwareProfile: { vmSize: "standard_d3" },
|
|
839
|
+
osProfile: {
|
|
840
|
+
linuxOperatingSystemProfile: {
|
|
841
|
+
password: "**********",
|
|
842
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
843
|
+
username: "sshuser"
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
targetInstanceCount: 2,
|
|
847
|
+
virtualNetworkProfile: {
|
|
848
|
+
id: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname",
|
|
849
|
+
subnet: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
]
|
|
853
|
+
},
|
|
854
|
+
osType: "Linux",
|
|
855
|
+
storageProfile: {
|
|
856
|
+
storageaccounts: [
|
|
857
|
+
{
|
|
858
|
+
name: "mystorage",
|
|
859
|
+
container: "containername",
|
|
860
|
+
isDefault: true,
|
|
861
|
+
key: "storage account key"
|
|
862
|
+
}
|
|
863
|
+
]
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
zones: ["1"]
|
|
867
|
+
};
|
|
868
|
+
const credential = new DefaultAzureCredential();
|
|
869
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
870
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
871
|
+
console.log(result);
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
createClusterWithAvailabilityZones().catch(console.error);
|
|
875
|
+
/**
|
|
876
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
877
|
+
*
|
|
878
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
879
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithComputeIsolationProperties.json
|
|
880
|
+
*/
|
|
881
|
+
function createClusterWithComputeIsolationProperties() {
|
|
882
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
883
|
+
const subscriptionId = "subId";
|
|
884
|
+
const resourceGroupName = "rg1";
|
|
885
|
+
const clusterName = "cluster1";
|
|
886
|
+
const parameters = {
|
|
887
|
+
properties: {
|
|
888
|
+
clusterDefinition: {
|
|
889
|
+
configurations: {
|
|
890
|
+
gateway: {
|
|
891
|
+
"restAuthCredential.isEnabled": true,
|
|
892
|
+
"restAuthCredential.password": "**********",
|
|
893
|
+
"restAuthCredential.username": "admin"
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
kind: "hadoop"
|
|
897
|
+
},
|
|
898
|
+
clusterVersion: "3.6",
|
|
899
|
+
computeIsolationProperties: {
|
|
900
|
+
enableComputeIsolation: true,
|
|
901
|
+
hostSku: undefined
|
|
902
|
+
},
|
|
903
|
+
computeProfile: {
|
|
904
|
+
roles: [
|
|
905
|
+
{
|
|
906
|
+
name: "headnode",
|
|
907
|
+
hardwareProfile: { vmSize: "standard_d3" },
|
|
908
|
+
osProfile: {
|
|
909
|
+
linuxOperatingSystemProfile: {
|
|
910
|
+
password: "**********",
|
|
911
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
912
|
+
username: "sshuser"
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
targetInstanceCount: 2
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
name: "workernode",
|
|
919
|
+
hardwareProfile: { vmSize: "standard_d3" },
|
|
920
|
+
osProfile: {
|
|
921
|
+
linuxOperatingSystemProfile: {
|
|
922
|
+
password: "**********",
|
|
923
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
924
|
+
username: "sshuser"
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
targetInstanceCount: 2
|
|
928
|
+
}
|
|
929
|
+
]
|
|
930
|
+
},
|
|
931
|
+
osType: "Linux",
|
|
932
|
+
storageProfile: {
|
|
933
|
+
storageaccounts: [
|
|
934
|
+
{
|
|
935
|
+
name: "mystorage",
|
|
936
|
+
container: "containername",
|
|
937
|
+
isDefault: true,
|
|
938
|
+
key: "storage account key"
|
|
939
|
+
}
|
|
940
|
+
]
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
const credential = new DefaultAzureCredential();
|
|
945
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
946
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
947
|
+
console.log(result);
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
createClusterWithComputeIsolationProperties().catch(console.error);
|
|
951
|
+
/**
|
|
952
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
953
|
+
*
|
|
954
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
955
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionAtHost.json
|
|
956
|
+
*/
|
|
957
|
+
function createClusterWithEncryptionAtHost() {
|
|
958
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
959
|
+
const subscriptionId = "subid";
|
|
960
|
+
const resourceGroupName = "rg1";
|
|
961
|
+
const clusterName = "cluster1";
|
|
962
|
+
const parameters = {
|
|
963
|
+
properties: {
|
|
964
|
+
clusterDefinition: {
|
|
965
|
+
configurations: {
|
|
966
|
+
gateway: {
|
|
967
|
+
"restAuthCredential.isEnabled": true,
|
|
968
|
+
"restAuthCredential.password": "**********",
|
|
969
|
+
"restAuthCredential.username": "admin"
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
kind: "Hadoop"
|
|
973
|
+
},
|
|
974
|
+
clusterVersion: "3.6",
|
|
975
|
+
computeProfile: {
|
|
976
|
+
roles: [
|
|
977
|
+
{
|
|
978
|
+
name: "headnode",
|
|
979
|
+
hardwareProfile: { vmSize: "Standard_DS14_v2" },
|
|
980
|
+
osProfile: {
|
|
981
|
+
linuxOperatingSystemProfile: {
|
|
982
|
+
password: "**********",
|
|
983
|
+
username: "sshuser"
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
targetInstanceCount: 2
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
name: "workernode",
|
|
990
|
+
hardwareProfile: { vmSize: "Standard_DS14_v2" },
|
|
991
|
+
osProfile: {
|
|
992
|
+
linuxOperatingSystemProfile: {
|
|
993
|
+
password: "**********",
|
|
994
|
+
username: "sshuser"
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
targetInstanceCount: 3
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
name: "zookeepernode",
|
|
1001
|
+
hardwareProfile: { vmSize: "Standard_DS14_v2" },
|
|
1002
|
+
osProfile: {
|
|
1003
|
+
linuxOperatingSystemProfile: {
|
|
1004
|
+
password: "**********",
|
|
1005
|
+
username: "sshuser"
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
targetInstanceCount: 3
|
|
1009
|
+
}
|
|
1010
|
+
]
|
|
1011
|
+
},
|
|
1012
|
+
diskEncryptionProperties: { encryptionAtHost: true },
|
|
1013
|
+
osType: "Linux",
|
|
1014
|
+
storageProfile: {
|
|
1015
|
+
storageaccounts: [
|
|
1016
|
+
{
|
|
1017
|
+
name: "mystorage.blob.core.windows.net",
|
|
1018
|
+
container: "default8525",
|
|
1019
|
+
isDefault: true,
|
|
1020
|
+
key: "storagekey"
|
|
1021
|
+
}
|
|
1022
|
+
]
|
|
1023
|
+
},
|
|
1024
|
+
tier: "Standard"
|
|
1025
|
+
}
|
|
1026
|
+
};
|
|
1027
|
+
const credential = new DefaultAzureCredential();
|
|
1028
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
1029
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
1030
|
+
console.log(result);
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
createClusterWithEncryptionAtHost().catch(console.error);
|
|
1034
|
+
/**
|
|
1035
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
1036
|
+
*
|
|
1037
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
1038
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionInTransit.json
|
|
1039
|
+
*/
|
|
1040
|
+
function createClusterWithEncryptionInTransit() {
|
|
1041
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1042
|
+
const subscriptionId = "subid";
|
|
1043
|
+
const resourceGroupName = "rg1";
|
|
1044
|
+
const clusterName = "cluster1";
|
|
1045
|
+
const parameters = {
|
|
1046
|
+
properties: {
|
|
1047
|
+
clusterDefinition: {
|
|
1048
|
+
configurations: {
|
|
1049
|
+
gateway: {
|
|
1050
|
+
"restAuthCredential.isEnabled": true,
|
|
1051
|
+
"restAuthCredential.password": "**********",
|
|
1052
|
+
"restAuthCredential.username": "admin"
|
|
1053
|
+
}
|
|
1054
|
+
},
|
|
1055
|
+
kind: "Hadoop"
|
|
1056
|
+
},
|
|
1057
|
+
clusterVersion: "3.6",
|
|
1058
|
+
computeProfile: {
|
|
1059
|
+
roles: [
|
|
1060
|
+
{
|
|
1061
|
+
name: "headnode",
|
|
1062
|
+
hardwareProfile: { vmSize: "Large" },
|
|
1063
|
+
osProfile: {
|
|
1064
|
+
linuxOperatingSystemProfile: {
|
|
1065
|
+
password: "**********",
|
|
1066
|
+
username: "sshuser"
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
targetInstanceCount: 2
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
name: "workernode",
|
|
1073
|
+
hardwareProfile: { vmSize: "Large" },
|
|
1074
|
+
osProfile: {
|
|
1075
|
+
linuxOperatingSystemProfile: {
|
|
1076
|
+
password: "**********",
|
|
1077
|
+
username: "sshuser"
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
targetInstanceCount: 3
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
name: "zookeepernode",
|
|
1084
|
+
hardwareProfile: { vmSize: "Small" },
|
|
1085
|
+
osProfile: {
|
|
1086
|
+
linuxOperatingSystemProfile: {
|
|
1087
|
+
password: "**********",
|
|
1088
|
+
username: "sshuser"
|
|
1089
|
+
}
|
|
1090
|
+
},
|
|
1091
|
+
targetInstanceCount: 3
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
1094
|
+
},
|
|
1095
|
+
encryptionInTransitProperties: { isEncryptionInTransitEnabled: true },
|
|
1096
|
+
osType: "Linux",
|
|
1097
|
+
storageProfile: {
|
|
1098
|
+
storageaccounts: [
|
|
1099
|
+
{
|
|
1100
|
+
name: "mystorage.blob.core.windows.net",
|
|
1101
|
+
container: "default8525",
|
|
1102
|
+
isDefault: true,
|
|
1103
|
+
key: "storagekey"
|
|
1104
|
+
}
|
|
1105
|
+
]
|
|
1106
|
+
},
|
|
1107
|
+
tier: "Standard"
|
|
1108
|
+
}
|
|
1109
|
+
};
|
|
1110
|
+
const credential = new DefaultAzureCredential();
|
|
1111
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
1112
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
1113
|
+
console.log(result);
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
createClusterWithEncryptionInTransit().catch(console.error);
|
|
1117
|
+
/**
|
|
1118
|
+
* This sample demonstrates how to Creates a new HDInsight cluster with the specified parameters.
|
|
1119
|
+
*
|
|
1120
|
+
* @summary Creates a new HDInsight cluster with the specified parameters.
|
|
1121
|
+
* x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithCustomNetworkProperties.json
|
|
1122
|
+
*/
|
|
1123
|
+
function createClusterWithNetworkProperties() {
|
|
1124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1125
|
+
const subscriptionId = "subId";
|
|
1126
|
+
const resourceGroupName = "rg1";
|
|
1127
|
+
const clusterName = "cluster1";
|
|
1128
|
+
const parameters = {
|
|
1129
|
+
properties: {
|
|
1130
|
+
clusterDefinition: {
|
|
1131
|
+
configurations: {
|
|
1132
|
+
gateway: {
|
|
1133
|
+
"restAuthCredential.isEnabled": true,
|
|
1134
|
+
"restAuthCredential.password": "**********",
|
|
1135
|
+
"restAuthCredential.username": "admin"
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1138
|
+
kind: "hadoop"
|
|
1139
|
+
},
|
|
1140
|
+
clusterVersion: "3.6",
|
|
1141
|
+
computeProfile: {
|
|
1142
|
+
roles: [
|
|
1143
|
+
{
|
|
1144
|
+
name: "headnode",
|
|
1145
|
+
hardwareProfile: { vmSize: "standard_d3" },
|
|
1146
|
+
osProfile: {
|
|
1147
|
+
linuxOperatingSystemProfile: {
|
|
1148
|
+
password: "**********",
|
|
1149
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
1150
|
+
username: "sshuser"
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
targetInstanceCount: 2,
|
|
1154
|
+
virtualNetworkProfile: {
|
|
1155
|
+
id: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname",
|
|
1156
|
+
subnet: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
name: "workernode",
|
|
1161
|
+
hardwareProfile: { vmSize: "standard_d3" },
|
|
1162
|
+
osProfile: {
|
|
1163
|
+
linuxOperatingSystemProfile: {
|
|
1164
|
+
password: "**********",
|
|
1165
|
+
sshProfile: { publicKeys: [{ certificateData: "**********" }] },
|
|
1166
|
+
username: "sshuser"
|
|
1167
|
+
}
|
|
1168
|
+
},
|
|
1169
|
+
targetInstanceCount: 2,
|
|
1170
|
+
virtualNetworkProfile: {
|
|
1171
|
+
id: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname",
|
|
1172
|
+
subnet: "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
]
|
|
1176
|
+
},
|
|
1177
|
+
networkProperties: {
|
|
1178
|
+
privateLink: "Enabled",
|
|
1179
|
+
resourceProviderConnection: "Outbound"
|
|
1180
|
+
},
|
|
1181
|
+
osType: "Linux",
|
|
1182
|
+
storageProfile: {
|
|
1183
|
+
storageaccounts: [
|
|
1184
|
+
{
|
|
1185
|
+
name: "mystorage",
|
|
1186
|
+
container: "containername",
|
|
1187
|
+
isDefault: true,
|
|
1188
|
+
key: "storage account key"
|
|
1189
|
+
}
|
|
1190
|
+
]
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
const credential = new DefaultAzureCredential();
|
|
1195
|
+
const client = new HDInsightManagementClient(credential, subscriptionId);
|
|
1196
|
+
const result = yield client.clusters.beginCreateAndWait(resourceGroupName, clusterName, parameters);
|
|
1197
|
+
console.log(result);
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
createClusterWithNetworkProperties().catch(console.error);
|
|
1201
|
+
//# sourceMappingURL=clustersCreateSample.js.map
|