@azure/arm-hdinsight 0.22.0 → 1.1.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 +5 -0
- package/{LICENSE.txt → LICENSE} +1 -1
- package/README.md +70 -74
- package/dist/index.js +7702 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/hDInsightManagementClient.d.ts +29 -0
- package/dist-esm/src/hDInsightManagementClient.d.ts.map +1 -0
- package/dist-esm/src/hDInsightManagementClient.js +62 -0
- package/dist-esm/src/hDInsightManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/{esm/models/configurationsMappers.js → dist-esm/src/index.js} +5 -2
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +1966 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +133 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +111 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +1813 -1305
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +37 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +280 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/applications.d.ts +90 -0
- package/dist-esm/src/operations/applications.d.ts.map +1 -0
- package/dist-esm/src/operations/applications.js +367 -0
- package/dist-esm/src/operations/applications.js.map +1 -0
- package/dist-esm/src/operations/clusters.d.ts +214 -0
- package/dist-esm/src/operations/clusters.d.ts.map +1 -0
- package/dist-esm/src/operations/clusters.js +979 -0
- package/dist-esm/src/operations/clusters.js.map +1 -0
- package/dist-esm/src/operations/configurations.d.ts +54 -0
- package/dist-esm/src/operations/configurations.d.ts.map +1 -0
- package/dist-esm/src/operations/configurations.js +178 -0
- package/dist-esm/src/operations/configurations.js.map +1 -0
- package/dist-esm/src/operations/extensions.d.ts +139 -0
- package/dist-esm/src/operations/extensions.d.ts.map +1 -0
- package/dist-esm/src/operations/extensions.js +602 -0
- package/dist-esm/src/operations/extensions.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +2 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +19 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/locations.d.ts +52 -0
- package/dist-esm/src/operations/locations.d.ts.map +1 -0
- package/dist-esm/src/operations/locations.js +199 -0
- package/dist-esm/src/operations/locations.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +81 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +349 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +28 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +85 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/scriptActions.d.ts +62 -0
- package/dist-esm/src/operations/scriptActions.d.ts.map +1 -0
- package/dist-esm/src/operations/scriptActions.js +232 -0
- package/dist-esm/src/operations/scriptActions.js.map +1 -0
- package/dist-esm/src/operations/scriptExecutionHistory.d.ts +46 -0
- package/dist-esm/src/operations/scriptExecutionHistory.d.ts.map +1 -0
- package/dist-esm/src/operations/scriptExecutionHistory.js +167 -0
- package/dist-esm/src/operations/scriptExecutionHistory.js.map +1 -0
- package/dist-esm/src/operations/virtualMachines.d.ts +45 -0
- package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -0
- package/dist-esm/src/operations/virtualMachines.js +169 -0
- package/dist-esm/src/operations/virtualMachines.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/applications.d.ts +65 -0
- package/dist-esm/src/operationsInterfaces/applications.d.ts.map +1 -0
- package/{src/models/virtualMachinesMappers.ts → dist-esm/src/operationsInterfaces/applications.js} +2 -5
- package/dist-esm/src/operationsInterfaces/applications.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/clusters.d.ts +178 -0
- package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -0
- package/{esm/models/index.js → dist-esm/src/operationsInterfaces/clusters.js} +2 -1
- package/dist-esm/src/operationsInterfaces/clusters.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/configurations.d.ts +46 -0
- package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +1 -0
- package/{src/models/configurationsMappers.ts → dist-esm/src/operationsInterfaces/configurations.js} +2 -5
- package/dist-esm/src/operationsInterfaces/configurations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/extensions.d.ts +131 -0
- package/dist-esm/src/operationsInterfaces/extensions.d.ts.map +1 -0
- package/{esm/models/virtualMachinesMappers.js → dist-esm/src/operationsInterfaces/extensions.js} +2 -2
- package/dist-esm/src/operationsInterfaces/extensions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +19 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/locations.d.ts +44 -0
- package/dist-esm/src/operationsInterfaces/locations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/locations.js +9 -0
- package/dist-esm/src/operationsInterfaces/locations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +20 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/scriptActions.d.ts +37 -0
- package/dist-esm/src/operationsInterfaces/scriptActions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/scriptActions.js +9 -0
- package/dist-esm/src/operationsInterfaces/scriptActions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/scriptExecutionHistory.d.ts +21 -0
- package/dist-esm/src/operationsInterfaces/scriptExecutionHistory.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/scriptExecutionHistory.js +9 -0
- package/dist-esm/src/operationsInterfaces/scriptExecutionHistory.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts +37 -0
- package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualMachines.js +9 -0
- package/dist-esm/src/operationsInterfaces/virtualMachines.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +65 -31
- package/review/arm-hdinsight.api.md +1678 -0
- package/rollup.config.js +181 -30
- package/src/hDInsightManagementClient.ts +106 -44
- package/src/{models/extensionsMappers.ts → index.ts} +4 -6
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +1760 -2084
- package/src/models/mappers.ts +1840 -1291
- package/src/models/parameters.ts +236 -44
- package/src/operations/applications.ts +383 -187
- package/src/operations/clusters.ts +1051 -535
- package/src/operations/configurations.ts +162 -154
- package/src/operations/extensions.ts +693 -216
- package/src/operations/index.ts +3 -2
- package/src/operations/locations.ts +186 -99
- package/src/operations/operations.ts +85 -73
- package/src/operations/privateEndpointConnections.ts +495 -0
- package/src/operations/privateLinkResources.ts +116 -0
- package/src/operations/scriptActions.ts +215 -157
- package/src/operations/scriptExecutionHistory.ts +155 -123
- package/src/operations/virtualMachines.ts +166 -101
- package/src/operationsInterfaces/applications.ts +126 -0
- package/src/operationsInterfaces/clusters.ts +327 -0
- package/src/operationsInterfaces/configurations.ts +77 -0
- package/src/operationsInterfaces/extensions.ts +234 -0
- package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +4 -3
- package/src/operationsInterfaces/locations.ts +88 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
- package/src/operationsInterfaces/privateLinkResources.ts +42 -0
- package/src/operationsInterfaces/scriptActions.ts +73 -0
- package/src/operationsInterfaces/scriptExecutionHistory.ts +43 -0
- package/src/operationsInterfaces/virtualMachines.ts +70 -0
- package/tsconfig.json +3 -3
- package/types/arm-hdinsight.d.ts +2866 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-hdinsight.js +0 -5759
- package/dist/arm-hdinsight.js.map +0 -1
- package/dist/arm-hdinsight.min.js +0 -1
- package/dist/arm-hdinsight.min.js.map +0 -1
- package/esm/hDInsightManagementClient.d.ts +0 -27
- package/esm/hDInsightManagementClient.d.ts.map +0 -1
- package/esm/hDInsightManagementClient.js +0 -41
- package/esm/hDInsightManagementClient.js.map +0 -1
- package/esm/hDInsightManagementClientContext.d.ts +0 -17
- package/esm/hDInsightManagementClientContext.d.ts.map +0 -1
- package/esm/hDInsightManagementClientContext.js +0 -56
- package/esm/hDInsightManagementClientContext.js.map +0 -1
- package/esm/models/applicationsMappers.d.ts +0 -2
- package/esm/models/applicationsMappers.d.ts.map +0 -1
- package/esm/models/applicationsMappers.js +0 -9
- package/esm/models/applicationsMappers.js.map +0 -1
- package/esm/models/clustersMappers.d.ts +0 -2
- package/esm/models/clustersMappers.d.ts.map +0 -1
- package/esm/models/clustersMappers.js +0 -9
- package/esm/models/clustersMappers.js.map +0 -1
- package/esm/models/configurationsMappers.d.ts +0 -2
- package/esm/models/configurationsMappers.d.ts.map +0 -1
- package/esm/models/configurationsMappers.js.map +0 -1
- package/esm/models/extensionsMappers.d.ts +0 -2
- package/esm/models/extensionsMappers.d.ts.map +0 -1
- package/esm/models/extensionsMappers.js +0 -9
- package/esm/models/extensionsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -2397
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/locationsMappers.d.ts +0 -2
- package/esm/models/locationsMappers.d.ts.map +0 -1
- package/esm/models/locationsMappers.js +0 -9
- package/esm/models/locationsMappers.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -94
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -15
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -142
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/scriptActionsMappers.d.ts +0 -2
- package/esm/models/scriptActionsMappers.d.ts.map +0 -1
- package/esm/models/scriptActionsMappers.js +0 -9
- package/esm/models/scriptActionsMappers.js.map +0 -1
- package/esm/models/scriptExecutionHistoryMappers.d.ts +0 -2
- package/esm/models/scriptExecutionHistoryMappers.d.ts.map +0 -1
- package/esm/models/scriptExecutionHistoryMappers.js +0 -9
- package/esm/models/scriptExecutionHistoryMappers.js.map +0 -1
- package/esm/models/virtualMachinesMappers.d.ts +0 -2
- package/esm/models/virtualMachinesMappers.d.ts.map +0 -1
- package/esm/models/virtualMachinesMappers.js.map +0 -1
- package/esm/operations/applications.d.ts +0 -115
- package/esm/operations/applications.d.ts.map +0 -1
- package/esm/operations/applications.js +0 -233
- package/esm/operations/applications.js.map +0 -1
- package/esm/operations/clusters.d.ts +0 -273
- package/esm/operations/clusters.d.ts.map +0 -1
- package/esm/operations/clusters.js +0 -621
- package/esm/operations/clusters.js.map +0 -1
- package/esm/operations/configurations.d.ts +0 -90
- package/esm/operations/configurations.d.ts.map +0 -1
- package/esm/operations/configurations.js +0 -173
- package/esm/operations/configurations.js.map +0 -1
- package/esm/operations/extensions.d.ts +0 -131
- package/esm/operations/extensions.d.ts.map +0 -1
- package/esm/operations/extensions.js +0 -307
- package/esm/operations/extensions.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/locations.d.ts +0 -67
- package/esm/operations/locations.d.ts.map +0 -1
- package/esm/operations/locations.js +0 -113
- package/esm/operations/locations.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -79
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/scriptActions.d.ts +0 -100
- package/esm/operations/scriptActions.d.ts.map +0 -1
- package/esm/operations/scriptActions.js +0 -151
- package/esm/operations/scriptActions.js.map +0 -1
- package/esm/operations/scriptExecutionHistory.d.ts +0 -76
- package/esm/operations/scriptExecutionHistory.d.ts.map +0 -1
- package/esm/operations/scriptExecutionHistory.js +0 -117
- package/esm/operations/scriptExecutionHistory.js.map +0 -1
- package/esm/operations/virtualMachines.d.ts +0 -53
- package/esm/operations/virtualMachines.d.ts.map +0 -1
- package/esm/operations/virtualMachines.js +0 -134
- package/esm/operations/virtualMachines.js.map +0 -1
- package/src/hDInsightManagementClientContext.ts +0 -62
- package/src/models/applicationsMappers.ts +0 -56
- package/src/models/clustersMappers.ts +0 -65
- package/src/models/locationsMappers.ts +0 -28
- package/src/models/operationsMappers.ts +0 -18
- package/src/models/scriptActionsMappers.ts +0 -15
- package/src/models/scriptExecutionHistoryMappers.ts +0 -15
|
@@ -3,26 +3,45 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as Mappers from "../models/extensionsMappers";
|
|
9
|
+
import { Extensions } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
14
12
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
13
|
+
import { HDInsightManagementClient } from "../hDInsightManagementClient";
|
|
14
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
15
|
+
import { LroImpl } from "../lroImpl";
|
|
16
|
+
import {
|
|
17
|
+
ClusterMonitoringRequest,
|
|
18
|
+
ExtensionsEnableMonitoringOptionalParams,
|
|
19
|
+
ExtensionsGetMonitoringStatusOptionalParams,
|
|
20
|
+
ExtensionsGetMonitoringStatusResponse,
|
|
21
|
+
ExtensionsDisableMonitoringOptionalParams,
|
|
22
|
+
AzureMonitorRequest,
|
|
23
|
+
ExtensionsEnableAzureMonitorOptionalParams,
|
|
24
|
+
ExtensionsGetAzureMonitorStatusOptionalParams,
|
|
25
|
+
ExtensionsGetAzureMonitorStatusResponse,
|
|
26
|
+
ExtensionsDisableAzureMonitorOptionalParams,
|
|
27
|
+
Extension,
|
|
28
|
+
ExtensionsCreateOptionalParams,
|
|
29
|
+
ExtensionsGetOptionalParams,
|
|
30
|
+
ExtensionsGetResponse,
|
|
31
|
+
ExtensionsDeleteOptionalParams,
|
|
32
|
+
ExtensionsGetAzureAsyncOperationStatusOptionalParams,
|
|
33
|
+
ExtensionsGetAzureAsyncOperationStatusResponse
|
|
34
|
+
} from "../models";
|
|
16
35
|
|
|
17
|
-
/** Class
|
|
18
|
-
export class Extensions {
|
|
19
|
-
private readonly client:
|
|
36
|
+
/** Class containing Extensions operations. */
|
|
37
|
+
export class ExtensionsImpl implements Extensions {
|
|
38
|
+
private readonly client: HDInsightManagementClient;
|
|
20
39
|
|
|
21
40
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
41
|
+
* Initialize a new instance of the class Extensions class.
|
|
42
|
+
* @param client Reference to the service client
|
|
24
43
|
*/
|
|
25
|
-
constructor(client:
|
|
44
|
+
constructor(client: HDInsightManagementClient) {
|
|
26
45
|
this.client = client;
|
|
27
46
|
}
|
|
28
47
|
|
|
@@ -31,179 +50,541 @@ export class Extensions {
|
|
|
31
50
|
* @param resourceGroupName The name of the resource group.
|
|
32
51
|
* @param clusterName The name of the cluster.
|
|
33
52
|
* @param parameters The Operations Management Suite (OMS) workspace parameters.
|
|
34
|
-
* @param
|
|
35
|
-
* @returns Promise<msRest.RestResponse>
|
|
53
|
+
* @param options The options parameters.
|
|
36
54
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
55
|
+
async beginEnableMonitoring(
|
|
56
|
+
resourceGroupName: string,
|
|
57
|
+
clusterName: string,
|
|
58
|
+
parameters: ClusterMonitoringRequest,
|
|
59
|
+
options?: ExtensionsEnableMonitoringOptionalParams
|
|
60
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
61
|
+
const directSendOperation = async (
|
|
62
|
+
args: coreClient.OperationArguments,
|
|
63
|
+
spec: coreClient.OperationSpec
|
|
64
|
+
): Promise<void> => {
|
|
65
|
+
return this.client.sendOperationRequest(args, spec);
|
|
66
|
+
};
|
|
67
|
+
const sendOperation = async (
|
|
68
|
+
args: coreClient.OperationArguments,
|
|
69
|
+
spec: coreClient.OperationSpec
|
|
70
|
+
) => {
|
|
71
|
+
let currentRawResponse:
|
|
72
|
+
| coreClient.FullOperationResponse
|
|
73
|
+
| undefined = undefined;
|
|
74
|
+
const providedCallback = args.options?.onResponse;
|
|
75
|
+
const callback: coreClient.RawResponseCallback = (
|
|
76
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
77
|
+
flatResponse: unknown
|
|
78
|
+
) => {
|
|
79
|
+
currentRawResponse = rawResponse;
|
|
80
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
81
|
+
};
|
|
82
|
+
const updatedArgs = {
|
|
83
|
+
...args,
|
|
84
|
+
options: {
|
|
85
|
+
...args.options,
|
|
86
|
+
onResponse: callback
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
90
|
+
return {
|
|
91
|
+
flatResponse,
|
|
92
|
+
rawResponse: {
|
|
93
|
+
statusCode: currentRawResponse!.status,
|
|
94
|
+
body: currentRawResponse!.parsedBody,
|
|
95
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const lro = new LroImpl(
|
|
101
|
+
sendOperation,
|
|
102
|
+
{ resourceGroupName, clusterName, parameters, options },
|
|
103
|
+
enableMonitoringOperationSpec
|
|
104
|
+
);
|
|
105
|
+
return new LroEngine(lro, {
|
|
106
|
+
resumeFrom: options?.resumeFrom,
|
|
107
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
108
|
+
lroResourceLocationConfig: "location"
|
|
109
|
+
});
|
|
40
110
|
}
|
|
41
111
|
|
|
42
112
|
/**
|
|
43
|
-
*
|
|
113
|
+
* Enables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
44
114
|
* @param resourceGroupName The name of the resource group.
|
|
45
115
|
* @param clusterName The name of the cluster.
|
|
46
|
-
* @param
|
|
47
|
-
* @
|
|
116
|
+
* @param parameters The Operations Management Suite (OMS) workspace parameters.
|
|
117
|
+
* @param options The options parameters.
|
|
48
118
|
*/
|
|
49
|
-
|
|
119
|
+
async beginEnableMonitoringAndWait(
|
|
120
|
+
resourceGroupName: string,
|
|
121
|
+
clusterName: string,
|
|
122
|
+
parameters: ClusterMonitoringRequest,
|
|
123
|
+
options?: ExtensionsEnableMonitoringOptionalParams
|
|
124
|
+
): Promise<void> {
|
|
125
|
+
const poller = await this.beginEnableMonitoring(
|
|
126
|
+
resourceGroupName,
|
|
127
|
+
clusterName,
|
|
128
|
+
parameters,
|
|
129
|
+
options
|
|
130
|
+
);
|
|
131
|
+
return poller.pollUntilDone();
|
|
132
|
+
}
|
|
133
|
+
|
|
50
134
|
/**
|
|
135
|
+
* Gets the status of Operations Management Suite (OMS) on the HDInsight cluster.
|
|
51
136
|
* @param resourceGroupName The name of the resource group.
|
|
52
137
|
* @param clusterName The name of the cluster.
|
|
53
|
-
* @param
|
|
138
|
+
* @param options The options parameters.
|
|
54
139
|
*/
|
|
55
|
-
getMonitoringStatus(
|
|
140
|
+
getMonitoringStatus(
|
|
141
|
+
resourceGroupName: string,
|
|
142
|
+
clusterName: string,
|
|
143
|
+
options?: ExtensionsGetMonitoringStatusOptionalParams
|
|
144
|
+
): Promise<ExtensionsGetMonitoringStatusResponse> {
|
|
145
|
+
return this.client.sendOperationRequest(
|
|
146
|
+
{ resourceGroupName, clusterName, options },
|
|
147
|
+
getMonitoringStatusOperationSpec
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
56
151
|
/**
|
|
152
|
+
* Disables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
57
153
|
* @param resourceGroupName The name of the resource group.
|
|
58
154
|
* @param clusterName The name of the cluster.
|
|
59
|
-
* @param options The
|
|
60
|
-
* @param callback The callback
|
|
155
|
+
* @param options The options parameters.
|
|
61
156
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
157
|
+
async beginDisableMonitoring(
|
|
158
|
+
resourceGroupName: string,
|
|
159
|
+
clusterName: string,
|
|
160
|
+
options?: ExtensionsDisableMonitoringOptionalParams
|
|
161
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
162
|
+
const directSendOperation = async (
|
|
163
|
+
args: coreClient.OperationArguments,
|
|
164
|
+
spec: coreClient.OperationSpec
|
|
165
|
+
): Promise<void> => {
|
|
166
|
+
return this.client.sendOperationRequest(args, spec);
|
|
167
|
+
};
|
|
168
|
+
const sendOperation = async (
|
|
169
|
+
args: coreClient.OperationArguments,
|
|
170
|
+
spec: coreClient.OperationSpec
|
|
171
|
+
) => {
|
|
172
|
+
let currentRawResponse:
|
|
173
|
+
| coreClient.FullOperationResponse
|
|
174
|
+
| undefined = undefined;
|
|
175
|
+
const providedCallback = args.options?.onResponse;
|
|
176
|
+
const callback: coreClient.RawResponseCallback = (
|
|
177
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
178
|
+
flatResponse: unknown
|
|
179
|
+
) => {
|
|
180
|
+
currentRawResponse = rawResponse;
|
|
181
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
182
|
+
};
|
|
183
|
+
const updatedArgs = {
|
|
184
|
+
...args,
|
|
185
|
+
options: {
|
|
186
|
+
...args.options,
|
|
187
|
+
onResponse: callback
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
191
|
+
return {
|
|
192
|
+
flatResponse,
|
|
193
|
+
rawResponse: {
|
|
194
|
+
statusCode: currentRawResponse!.status,
|
|
195
|
+
body: currentRawResponse!.parsedBody,
|
|
196
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
const lro = new LroImpl(
|
|
202
|
+
sendOperation,
|
|
203
|
+
{ resourceGroupName, clusterName, options },
|
|
204
|
+
disableMonitoringOperationSpec
|
|
205
|
+
);
|
|
206
|
+
return new LroEngine(lro, {
|
|
207
|
+
resumeFrom: options?.resumeFrom,
|
|
208
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
209
|
+
lroResourceLocationConfig: "location"
|
|
210
|
+
});
|
|
72
211
|
}
|
|
73
212
|
|
|
74
213
|
/**
|
|
75
214
|
* Disables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
76
215
|
* @param resourceGroupName The name of the resource group.
|
|
77
216
|
* @param clusterName The name of the cluster.
|
|
78
|
-
* @param
|
|
79
|
-
* @returns Promise<msRest.RestResponse>
|
|
217
|
+
* @param options The options parameters.
|
|
80
218
|
*/
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
219
|
+
async beginDisableMonitoringAndWait(
|
|
220
|
+
resourceGroupName: string,
|
|
221
|
+
clusterName: string,
|
|
222
|
+
options?: ExtensionsDisableMonitoringOptionalParams
|
|
223
|
+
): Promise<void> {
|
|
224
|
+
const poller = await this.beginDisableMonitoring(
|
|
225
|
+
resourceGroupName,
|
|
226
|
+
clusterName,
|
|
227
|
+
options
|
|
228
|
+
);
|
|
229
|
+
return poller.pollUntilDone();
|
|
84
230
|
}
|
|
85
231
|
|
|
86
232
|
/**
|
|
87
|
-
*
|
|
233
|
+
* Enables the Azure Monitor on the HDInsight cluster.
|
|
88
234
|
* @param resourceGroupName The name of the resource group.
|
|
89
235
|
* @param clusterName The name of the cluster.
|
|
90
|
-
* @param
|
|
91
|
-
* @param
|
|
92
|
-
* @param [options] The optional parameters
|
|
93
|
-
* @returns Promise<msRest.RestResponse>
|
|
236
|
+
* @param parameters The Log Analytics workspace parameters.
|
|
237
|
+
* @param options The options parameters.
|
|
94
238
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
239
|
+
async beginEnableAzureMonitor(
|
|
240
|
+
resourceGroupName: string,
|
|
241
|
+
clusterName: string,
|
|
242
|
+
parameters: AzureMonitorRequest,
|
|
243
|
+
options?: ExtensionsEnableAzureMonitorOptionalParams
|
|
244
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
245
|
+
const directSendOperation = async (
|
|
246
|
+
args: coreClient.OperationArguments,
|
|
247
|
+
spec: coreClient.OperationSpec
|
|
248
|
+
): Promise<void> => {
|
|
249
|
+
return this.client.sendOperationRequest(args, spec);
|
|
250
|
+
};
|
|
251
|
+
const sendOperation = async (
|
|
252
|
+
args: coreClient.OperationArguments,
|
|
253
|
+
spec: coreClient.OperationSpec
|
|
254
|
+
) => {
|
|
255
|
+
let currentRawResponse:
|
|
256
|
+
| coreClient.FullOperationResponse
|
|
257
|
+
| undefined = undefined;
|
|
258
|
+
const providedCallback = args.options?.onResponse;
|
|
259
|
+
const callback: coreClient.RawResponseCallback = (
|
|
260
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
261
|
+
flatResponse: unknown
|
|
262
|
+
) => {
|
|
263
|
+
currentRawResponse = rawResponse;
|
|
264
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
265
|
+
};
|
|
266
|
+
const updatedArgs = {
|
|
267
|
+
...args,
|
|
268
|
+
options: {
|
|
269
|
+
...args.options,
|
|
270
|
+
onResponse: callback
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
274
|
+
return {
|
|
275
|
+
flatResponse,
|
|
276
|
+
rawResponse: {
|
|
277
|
+
statusCode: currentRawResponse!.status,
|
|
278
|
+
body: currentRawResponse!.parsedBody,
|
|
279
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const lro = new LroImpl(
|
|
285
|
+
sendOperation,
|
|
286
|
+
{ resourceGroupName, clusterName, parameters, options },
|
|
287
|
+
enableAzureMonitorOperationSpec
|
|
288
|
+
);
|
|
289
|
+
return new LroEngine(lro, {
|
|
290
|
+
resumeFrom: options?.resumeFrom,
|
|
291
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
292
|
+
lroResourceLocationConfig: "location"
|
|
293
|
+
});
|
|
98
294
|
}
|
|
99
295
|
|
|
100
296
|
/**
|
|
101
|
-
*
|
|
297
|
+
* Enables the Azure Monitor on the HDInsight cluster.
|
|
102
298
|
* @param resourceGroupName The name of the resource group.
|
|
103
299
|
* @param clusterName The name of the cluster.
|
|
104
|
-
* @param
|
|
105
|
-
* @param
|
|
106
|
-
* @returns Promise<Models.ExtensionsGetResponse>
|
|
300
|
+
* @param parameters The Log Analytics workspace parameters.
|
|
301
|
+
* @param options The options parameters.
|
|
107
302
|
*/
|
|
108
|
-
|
|
303
|
+
async beginEnableAzureMonitorAndWait(
|
|
304
|
+
resourceGroupName: string,
|
|
305
|
+
clusterName: string,
|
|
306
|
+
parameters: AzureMonitorRequest,
|
|
307
|
+
options?: ExtensionsEnableAzureMonitorOptionalParams
|
|
308
|
+
): Promise<void> {
|
|
309
|
+
const poller = await this.beginEnableAzureMonitor(
|
|
310
|
+
resourceGroupName,
|
|
311
|
+
clusterName,
|
|
312
|
+
parameters,
|
|
313
|
+
options
|
|
314
|
+
);
|
|
315
|
+
return poller.pollUntilDone();
|
|
316
|
+
}
|
|
317
|
+
|
|
109
318
|
/**
|
|
319
|
+
* Gets the status of Azure Monitor on the HDInsight cluster.
|
|
110
320
|
* @param resourceGroupName The name of the resource group.
|
|
111
321
|
* @param clusterName The name of the cluster.
|
|
112
|
-
* @param
|
|
113
|
-
* @param callback The callback
|
|
322
|
+
* @param options The options parameters.
|
|
114
323
|
*/
|
|
115
|
-
|
|
324
|
+
getAzureMonitorStatus(
|
|
325
|
+
resourceGroupName: string,
|
|
326
|
+
clusterName: string,
|
|
327
|
+
options?: ExtensionsGetAzureMonitorStatusOptionalParams
|
|
328
|
+
): Promise<ExtensionsGetAzureMonitorStatusResponse> {
|
|
329
|
+
return this.client.sendOperationRequest(
|
|
330
|
+
{ resourceGroupName, clusterName, options },
|
|
331
|
+
getAzureMonitorStatusOperationSpec
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
116
335
|
/**
|
|
336
|
+
* Disables the Azure Monitor on the HDInsight cluster.
|
|
117
337
|
* @param resourceGroupName The name of the resource group.
|
|
118
338
|
* @param clusterName The name of the cluster.
|
|
119
|
-
* @param
|
|
120
|
-
* @param options The optional parameters
|
|
121
|
-
* @param callback The callback
|
|
339
|
+
* @param options The options parameters.
|
|
122
340
|
*/
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
341
|
+
async beginDisableAzureMonitor(
|
|
342
|
+
resourceGroupName: string,
|
|
343
|
+
clusterName: string,
|
|
344
|
+
options?: ExtensionsDisableAzureMonitorOptionalParams
|
|
345
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
346
|
+
const directSendOperation = async (
|
|
347
|
+
args: coreClient.OperationArguments,
|
|
348
|
+
spec: coreClient.OperationSpec
|
|
349
|
+
): Promise<void> => {
|
|
350
|
+
return this.client.sendOperationRequest(args, spec);
|
|
351
|
+
};
|
|
352
|
+
const sendOperation = async (
|
|
353
|
+
args: coreClient.OperationArguments,
|
|
354
|
+
spec: coreClient.OperationSpec
|
|
355
|
+
) => {
|
|
356
|
+
let currentRawResponse:
|
|
357
|
+
| coreClient.FullOperationResponse
|
|
358
|
+
| undefined = undefined;
|
|
359
|
+
const providedCallback = args.options?.onResponse;
|
|
360
|
+
const callback: coreClient.RawResponseCallback = (
|
|
361
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
362
|
+
flatResponse: unknown
|
|
363
|
+
) => {
|
|
364
|
+
currentRawResponse = rawResponse;
|
|
365
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
366
|
+
};
|
|
367
|
+
const updatedArgs = {
|
|
368
|
+
...args,
|
|
369
|
+
options: {
|
|
370
|
+
...args.options,
|
|
371
|
+
onResponse: callback
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
375
|
+
return {
|
|
376
|
+
flatResponse,
|
|
377
|
+
rawResponse: {
|
|
378
|
+
statusCode: currentRawResponse!.status,
|
|
379
|
+
body: currentRawResponse!.parsedBody,
|
|
380
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
const lro = new LroImpl(
|
|
386
|
+
sendOperation,
|
|
387
|
+
{ resourceGroupName, clusterName, options },
|
|
388
|
+
disableAzureMonitorOperationSpec
|
|
389
|
+
);
|
|
390
|
+
return new LroEngine(lro, {
|
|
391
|
+
resumeFrom: options?.resumeFrom,
|
|
392
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
393
|
+
lroResourceLocationConfig: "location"
|
|
394
|
+
});
|
|
134
395
|
}
|
|
135
396
|
|
|
136
397
|
/**
|
|
137
|
-
*
|
|
398
|
+
* Disables the Azure Monitor on the HDInsight cluster.
|
|
399
|
+
* @param resourceGroupName The name of the resource group.
|
|
400
|
+
* @param clusterName The name of the cluster.
|
|
401
|
+
* @param options The options parameters.
|
|
402
|
+
*/
|
|
403
|
+
async beginDisableAzureMonitorAndWait(
|
|
404
|
+
resourceGroupName: string,
|
|
405
|
+
clusterName: string,
|
|
406
|
+
options?: ExtensionsDisableAzureMonitorOptionalParams
|
|
407
|
+
): Promise<void> {
|
|
408
|
+
const poller = await this.beginDisableAzureMonitor(
|
|
409
|
+
resourceGroupName,
|
|
410
|
+
clusterName,
|
|
411
|
+
options
|
|
412
|
+
);
|
|
413
|
+
return poller.pollUntilDone();
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Creates an HDInsight cluster extension.
|
|
138
418
|
* @param resourceGroupName The name of the resource group.
|
|
139
419
|
* @param clusterName The name of the cluster.
|
|
140
420
|
* @param extensionName The name of the cluster extension.
|
|
141
|
-
* @param
|
|
142
|
-
* @
|
|
421
|
+
* @param parameters The cluster extensions create request.
|
|
422
|
+
* @param options The options parameters.
|
|
143
423
|
*/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
424
|
+
async beginCreate(
|
|
425
|
+
resourceGroupName: string,
|
|
426
|
+
clusterName: string,
|
|
427
|
+
extensionName: string,
|
|
428
|
+
parameters: Extension,
|
|
429
|
+
options?: ExtensionsCreateOptionalParams
|
|
430
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
431
|
+
const directSendOperation = async (
|
|
432
|
+
args: coreClient.OperationArguments,
|
|
433
|
+
spec: coreClient.OperationSpec
|
|
434
|
+
): Promise<void> => {
|
|
435
|
+
return this.client.sendOperationRequest(args, spec);
|
|
436
|
+
};
|
|
437
|
+
const sendOperation = async (
|
|
438
|
+
args: coreClient.OperationArguments,
|
|
439
|
+
spec: coreClient.OperationSpec
|
|
440
|
+
) => {
|
|
441
|
+
let currentRawResponse:
|
|
442
|
+
| coreClient.FullOperationResponse
|
|
443
|
+
| undefined = undefined;
|
|
444
|
+
const providedCallback = args.options?.onResponse;
|
|
445
|
+
const callback: coreClient.RawResponseCallback = (
|
|
446
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
447
|
+
flatResponse: unknown
|
|
448
|
+
) => {
|
|
449
|
+
currentRawResponse = rawResponse;
|
|
450
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
451
|
+
};
|
|
452
|
+
const updatedArgs = {
|
|
453
|
+
...args,
|
|
454
|
+
options: {
|
|
455
|
+
...args.options,
|
|
456
|
+
onResponse: callback
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
460
|
+
return {
|
|
461
|
+
flatResponse,
|
|
462
|
+
rawResponse: {
|
|
463
|
+
statusCode: currentRawResponse!.status,
|
|
464
|
+
body: currentRawResponse!.parsedBody,
|
|
465
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
const lro = new LroImpl(
|
|
471
|
+
sendOperation,
|
|
472
|
+
{ resourceGroupName, clusterName, extensionName, parameters, options },
|
|
473
|
+
createOperationSpec
|
|
474
|
+
);
|
|
475
|
+
return new LroEngine(lro, {
|
|
476
|
+
resumeFrom: options?.resumeFrom,
|
|
477
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
478
|
+
lroResourceLocationConfig: "location"
|
|
479
|
+
});
|
|
147
480
|
}
|
|
148
481
|
|
|
149
482
|
/**
|
|
150
|
-
*
|
|
483
|
+
* Creates an HDInsight cluster extension.
|
|
151
484
|
* @param resourceGroupName The name of the resource group.
|
|
152
485
|
* @param clusterName The name of the cluster.
|
|
153
|
-
* @param
|
|
154
|
-
* @param
|
|
155
|
-
* @
|
|
486
|
+
* @param extensionName The name of the cluster extension.
|
|
487
|
+
* @param parameters The cluster extensions create request.
|
|
488
|
+
* @param options The options parameters.
|
|
156
489
|
*/
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
490
|
+
async beginCreateAndWait(
|
|
491
|
+
resourceGroupName: string,
|
|
492
|
+
clusterName: string,
|
|
493
|
+
extensionName: string,
|
|
494
|
+
parameters: Extension,
|
|
495
|
+
options?: ExtensionsCreateOptionalParams
|
|
496
|
+
): Promise<void> {
|
|
497
|
+
const poller = await this.beginCreate(
|
|
498
|
+
resourceGroupName,
|
|
499
|
+
clusterName,
|
|
500
|
+
extensionName,
|
|
501
|
+
parameters,
|
|
502
|
+
options
|
|
503
|
+
);
|
|
504
|
+
return poller.pollUntilDone();
|
|
167
505
|
}
|
|
168
506
|
|
|
169
507
|
/**
|
|
170
|
-
*
|
|
508
|
+
* Gets the extension properties for the specified HDInsight cluster extension.
|
|
171
509
|
* @param resourceGroupName The name of the resource group.
|
|
172
510
|
* @param clusterName The name of the cluster.
|
|
173
|
-
* @param
|
|
174
|
-
* @
|
|
511
|
+
* @param extensionName The name of the cluster extension.
|
|
512
|
+
* @param options The options parameters.
|
|
175
513
|
*/
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
514
|
+
get(
|
|
515
|
+
resourceGroupName: string,
|
|
516
|
+
clusterName: string,
|
|
517
|
+
extensionName: string,
|
|
518
|
+
options?: ExtensionsGetOptionalParams
|
|
519
|
+
): Promise<ExtensionsGetResponse> {
|
|
520
|
+
return this.client.sendOperationRequest(
|
|
521
|
+
{ resourceGroupName, clusterName, extensionName, options },
|
|
522
|
+
getOperationSpec
|
|
523
|
+
);
|
|
185
524
|
}
|
|
186
525
|
|
|
187
526
|
/**
|
|
188
|
-
*
|
|
527
|
+
* Deletes the specified extension for HDInsight cluster.
|
|
189
528
|
* @param resourceGroupName The name of the resource group.
|
|
190
529
|
* @param clusterName The name of the cluster.
|
|
191
530
|
* @param extensionName The name of the cluster extension.
|
|
192
|
-
* @param
|
|
193
|
-
* @param [options] The optional parameters
|
|
194
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
531
|
+
* @param options The options parameters.
|
|
195
532
|
*/
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
533
|
+
async beginDelete(
|
|
534
|
+
resourceGroupName: string,
|
|
535
|
+
clusterName: string,
|
|
536
|
+
extensionName: string,
|
|
537
|
+
options?: ExtensionsDeleteOptionalParams
|
|
538
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
539
|
+
const directSendOperation = async (
|
|
540
|
+
args: coreClient.OperationArguments,
|
|
541
|
+
spec: coreClient.OperationSpec
|
|
542
|
+
): Promise<void> => {
|
|
543
|
+
return this.client.sendOperationRequest(args, spec);
|
|
544
|
+
};
|
|
545
|
+
const sendOperation = async (
|
|
546
|
+
args: coreClient.OperationArguments,
|
|
547
|
+
spec: coreClient.OperationSpec
|
|
548
|
+
) => {
|
|
549
|
+
let currentRawResponse:
|
|
550
|
+
| coreClient.FullOperationResponse
|
|
551
|
+
| undefined = undefined;
|
|
552
|
+
const providedCallback = args.options?.onResponse;
|
|
553
|
+
const callback: coreClient.RawResponseCallback = (
|
|
554
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
555
|
+
flatResponse: unknown
|
|
556
|
+
) => {
|
|
557
|
+
currentRawResponse = rawResponse;
|
|
558
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
559
|
+
};
|
|
560
|
+
const updatedArgs = {
|
|
561
|
+
...args,
|
|
562
|
+
options: {
|
|
563
|
+
...args.options,
|
|
564
|
+
onResponse: callback
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
568
|
+
return {
|
|
569
|
+
flatResponse,
|
|
570
|
+
rawResponse: {
|
|
571
|
+
statusCode: currentRawResponse!.status,
|
|
572
|
+
body: currentRawResponse!.parsedBody,
|
|
573
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
const lro = new LroImpl(
|
|
579
|
+
sendOperation,
|
|
580
|
+
{ resourceGroupName, clusterName, extensionName, options },
|
|
581
|
+
deleteOperationSpec
|
|
582
|
+
);
|
|
583
|
+
return new LroEngine(lro, {
|
|
584
|
+
resumeFrom: options?.resumeFrom,
|
|
585
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
586
|
+
lroResourceLocationConfig: "location"
|
|
587
|
+
});
|
|
207
588
|
}
|
|
208
589
|
|
|
209
590
|
/**
|
|
@@ -211,38 +592,76 @@ export class Extensions {
|
|
|
211
592
|
* @param resourceGroupName The name of the resource group.
|
|
212
593
|
* @param clusterName The name of the cluster.
|
|
213
594
|
* @param extensionName The name of the cluster extension.
|
|
214
|
-
* @param
|
|
215
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
595
|
+
* @param options The options parameters.
|
|
216
596
|
*/
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
597
|
+
async beginDeleteAndWait(
|
|
598
|
+
resourceGroupName: string,
|
|
599
|
+
clusterName: string,
|
|
600
|
+
extensionName: string,
|
|
601
|
+
options?: ExtensionsDeleteOptionalParams
|
|
602
|
+
): Promise<void> {
|
|
603
|
+
const poller = await this.beginDelete(
|
|
604
|
+
resourceGroupName,
|
|
605
|
+
clusterName,
|
|
606
|
+
extensionName,
|
|
607
|
+
options
|
|
608
|
+
);
|
|
609
|
+
return poller.pollUntilDone();
|
|
227
610
|
}
|
|
228
|
-
}
|
|
229
611
|
|
|
612
|
+
/**
|
|
613
|
+
* Gets the async operation status.
|
|
614
|
+
* @param resourceGroupName The name of the resource group.
|
|
615
|
+
* @param clusterName The name of the cluster.
|
|
616
|
+
* @param extensionName The name of the cluster extension.
|
|
617
|
+
* @param operationId The long running operation id.
|
|
618
|
+
* @param options The options parameters.
|
|
619
|
+
*/
|
|
620
|
+
getAzureAsyncOperationStatus(
|
|
621
|
+
resourceGroupName: string,
|
|
622
|
+
clusterName: string,
|
|
623
|
+
extensionName: string,
|
|
624
|
+
operationId: string,
|
|
625
|
+
options?: ExtensionsGetAzureAsyncOperationStatusOptionalParams
|
|
626
|
+
): Promise<ExtensionsGetAzureAsyncOperationStatusResponse> {
|
|
627
|
+
return this.client.sendOperationRequest(
|
|
628
|
+
{ resourceGroupName, clusterName, extensionName, operationId, options },
|
|
629
|
+
getAzureAsyncOperationStatusOperationSpec
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
230
633
|
// Operation Specifications
|
|
231
|
-
const serializer =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
path:
|
|
634
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
635
|
+
|
|
636
|
+
const enableMonitoringOperationSpec: coreClient.OperationSpec = {
|
|
637
|
+
path:
|
|
638
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring",
|
|
639
|
+
httpMethod: "PUT",
|
|
640
|
+
responses: {
|
|
641
|
+
200: {},
|
|
642
|
+
201: {},
|
|
643
|
+
202: {},
|
|
644
|
+
204: {},
|
|
645
|
+
default: {
|
|
646
|
+
bodyMapper: Mappers.ErrorResponse
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
requestBody: Parameters.parameters12,
|
|
650
|
+
queryParameters: [Parameters.apiVersion],
|
|
235
651
|
urlParameters: [
|
|
652
|
+
Parameters.$host,
|
|
236
653
|
Parameters.subscriptionId,
|
|
237
654
|
Parameters.resourceGroupName,
|
|
238
655
|
Parameters.clusterName
|
|
239
656
|
],
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
657
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
658
|
+
mediaType: "json",
|
|
659
|
+
serializer
|
|
660
|
+
};
|
|
661
|
+
const getMonitoringStatusOperationSpec: coreClient.OperationSpec = {
|
|
662
|
+
path:
|
|
663
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring",
|
|
664
|
+
httpMethod: "GET",
|
|
246
665
|
responses: {
|
|
247
666
|
200: {
|
|
248
667
|
bodyMapper: Mappers.ClusterMonitoringResponse
|
|
@@ -251,145 +670,203 @@ const getMonitoringStatusOperationSpec: msRest.OperationSpec = {
|
|
|
251
670
|
bodyMapper: Mappers.ErrorResponse
|
|
252
671
|
}
|
|
253
672
|
},
|
|
254
|
-
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
const getOperationSpec: msRest.OperationSpec = {
|
|
258
|
-
httpMethod: "GET",
|
|
259
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}",
|
|
673
|
+
queryParameters: [Parameters.apiVersion],
|
|
260
674
|
urlParameters: [
|
|
675
|
+
Parameters.$host,
|
|
261
676
|
Parameters.subscriptionId,
|
|
262
677
|
Parameters.resourceGroupName,
|
|
263
|
-
Parameters.clusterName
|
|
264
|
-
Parameters.extensionName
|
|
265
|
-
],
|
|
266
|
-
queryParameters: [
|
|
267
|
-
Parameters.apiVersion
|
|
268
|
-
],
|
|
269
|
-
headerParameters: [
|
|
270
|
-
Parameters.acceptLanguage
|
|
678
|
+
Parameters.clusterName
|
|
271
679
|
],
|
|
680
|
+
headerParameters: [Parameters.accept],
|
|
681
|
+
serializer
|
|
682
|
+
};
|
|
683
|
+
const disableMonitoringOperationSpec: coreClient.OperationSpec = {
|
|
684
|
+
path:
|
|
685
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring",
|
|
686
|
+
httpMethod: "DELETE",
|
|
272
687
|
responses: {
|
|
273
|
-
200: {
|
|
274
|
-
|
|
275
|
-
},
|
|
688
|
+
200: {},
|
|
689
|
+
201: {},
|
|
690
|
+
202: {},
|
|
691
|
+
204: {},
|
|
276
692
|
default: {
|
|
277
693
|
bodyMapper: Mappers.ErrorResponse
|
|
278
694
|
}
|
|
279
695
|
},
|
|
280
|
-
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
const beginEnableMonitoringOperationSpec: msRest.OperationSpec = {
|
|
284
|
-
httpMethod: "PUT",
|
|
285
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring",
|
|
696
|
+
queryParameters: [Parameters.apiVersion],
|
|
286
697
|
urlParameters: [
|
|
698
|
+
Parameters.$host,
|
|
287
699
|
Parameters.subscriptionId,
|
|
288
700
|
Parameters.resourceGroupName,
|
|
289
701
|
Parameters.clusterName
|
|
290
702
|
],
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
parameterPath: "parameters",
|
|
299
|
-
mapper: {
|
|
300
|
-
...Mappers.ClusterMonitoringRequest,
|
|
301
|
-
required: true
|
|
302
|
-
}
|
|
303
|
-
},
|
|
703
|
+
headerParameters: [Parameters.accept],
|
|
704
|
+
serializer
|
|
705
|
+
};
|
|
706
|
+
const enableAzureMonitorOperationSpec: coreClient.OperationSpec = {
|
|
707
|
+
path:
|
|
708
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor",
|
|
709
|
+
httpMethod: "PUT",
|
|
304
710
|
responses: {
|
|
305
711
|
200: {},
|
|
712
|
+
201: {},
|
|
306
713
|
202: {},
|
|
714
|
+
204: {},
|
|
307
715
|
default: {
|
|
308
716
|
bodyMapper: Mappers.ErrorResponse
|
|
309
717
|
}
|
|
310
718
|
},
|
|
719
|
+
requestBody: Parameters.parameters13,
|
|
720
|
+
queryParameters: [Parameters.apiVersion],
|
|
721
|
+
urlParameters: [
|
|
722
|
+
Parameters.$host,
|
|
723
|
+
Parameters.subscriptionId,
|
|
724
|
+
Parameters.resourceGroupName,
|
|
725
|
+
Parameters.clusterName
|
|
726
|
+
],
|
|
727
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
728
|
+
mediaType: "json",
|
|
311
729
|
serializer
|
|
312
730
|
};
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
731
|
+
const getAzureMonitorStatusOperationSpec: coreClient.OperationSpec = {
|
|
732
|
+
path:
|
|
733
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor",
|
|
734
|
+
httpMethod: "GET",
|
|
735
|
+
responses: {
|
|
736
|
+
200: {
|
|
737
|
+
bodyMapper: Mappers.AzureMonitorResponse
|
|
738
|
+
},
|
|
739
|
+
default: {
|
|
740
|
+
bodyMapper: Mappers.ErrorResponse
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
queryParameters: [Parameters.apiVersion],
|
|
317
744
|
urlParameters: [
|
|
745
|
+
Parameters.$host,
|
|
318
746
|
Parameters.subscriptionId,
|
|
319
747
|
Parameters.resourceGroupName,
|
|
320
748
|
Parameters.clusterName
|
|
321
749
|
],
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
750
|
+
headerParameters: [Parameters.accept],
|
|
751
|
+
serializer
|
|
752
|
+
};
|
|
753
|
+
const disableAzureMonitorOperationSpec: coreClient.OperationSpec = {
|
|
754
|
+
path:
|
|
755
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor",
|
|
756
|
+
httpMethod: "DELETE",
|
|
328
757
|
responses: {
|
|
329
758
|
200: {},
|
|
759
|
+
201: {},
|
|
330
760
|
202: {},
|
|
331
761
|
204: {},
|
|
332
762
|
default: {
|
|
333
763
|
bodyMapper: Mappers.ErrorResponse
|
|
334
764
|
}
|
|
335
765
|
},
|
|
766
|
+
queryParameters: [Parameters.apiVersion],
|
|
767
|
+
urlParameters: [
|
|
768
|
+
Parameters.$host,
|
|
769
|
+
Parameters.subscriptionId,
|
|
770
|
+
Parameters.resourceGroupName,
|
|
771
|
+
Parameters.clusterName
|
|
772
|
+
],
|
|
773
|
+
headerParameters: [Parameters.accept],
|
|
336
774
|
serializer
|
|
337
775
|
};
|
|
338
|
-
|
|
339
|
-
|
|
776
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
777
|
+
path:
|
|
778
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}",
|
|
340
779
|
httpMethod: "PUT",
|
|
341
|
-
|
|
780
|
+
responses: {
|
|
781
|
+
200: {},
|
|
782
|
+
201: {},
|
|
783
|
+
202: {},
|
|
784
|
+
204: {},
|
|
785
|
+
default: {
|
|
786
|
+
bodyMapper: Mappers.ErrorResponse
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
requestBody: Parameters.parameters14,
|
|
790
|
+
queryParameters: [Parameters.apiVersion],
|
|
342
791
|
urlParameters: [
|
|
792
|
+
Parameters.$host,
|
|
343
793
|
Parameters.subscriptionId,
|
|
344
794
|
Parameters.resourceGroupName,
|
|
345
795
|
Parameters.clusterName,
|
|
346
796
|
Parameters.extensionName
|
|
347
797
|
],
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
798
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
799
|
+
mediaType: "json",
|
|
800
|
+
serializer
|
|
801
|
+
};
|
|
802
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
803
|
+
path:
|
|
804
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}",
|
|
805
|
+
httpMethod: "GET",
|
|
806
|
+
responses: {
|
|
807
|
+
200: {
|
|
808
|
+
bodyMapper: Mappers.ClusterMonitoringResponse
|
|
809
|
+
},
|
|
810
|
+
default: {
|
|
811
|
+
bodyMapper: Mappers.ErrorResponse
|
|
359
812
|
}
|
|
360
813
|
},
|
|
814
|
+
queryParameters: [Parameters.apiVersion],
|
|
815
|
+
urlParameters: [
|
|
816
|
+
Parameters.$host,
|
|
817
|
+
Parameters.subscriptionId,
|
|
818
|
+
Parameters.resourceGroupName,
|
|
819
|
+
Parameters.clusterName,
|
|
820
|
+
Parameters.extensionName
|
|
821
|
+
],
|
|
822
|
+
headerParameters: [Parameters.accept],
|
|
823
|
+
serializer
|
|
824
|
+
};
|
|
825
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
826
|
+
path:
|
|
827
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}",
|
|
828
|
+
httpMethod: "DELETE",
|
|
361
829
|
responses: {
|
|
362
830
|
200: {},
|
|
831
|
+
201: {},
|
|
363
832
|
202: {},
|
|
833
|
+
204: {},
|
|
364
834
|
default: {
|
|
365
835
|
bodyMapper: Mappers.ErrorResponse
|
|
366
836
|
}
|
|
367
837
|
},
|
|
368
|
-
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
|
|
372
|
-
httpMethod: "DELETE",
|
|
373
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}",
|
|
838
|
+
queryParameters: [Parameters.apiVersion],
|
|
374
839
|
urlParameters: [
|
|
840
|
+
Parameters.$host,
|
|
375
841
|
Parameters.subscriptionId,
|
|
376
842
|
Parameters.resourceGroupName,
|
|
377
843
|
Parameters.clusterName,
|
|
378
844
|
Parameters.extensionName
|
|
379
845
|
],
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
846
|
+
headerParameters: [Parameters.accept],
|
|
847
|
+
serializer
|
|
848
|
+
};
|
|
849
|
+
const getAzureAsyncOperationStatusOperationSpec: coreClient.OperationSpec = {
|
|
850
|
+
path:
|
|
851
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}/azureAsyncOperations/{operationId}",
|
|
852
|
+
httpMethod: "GET",
|
|
386
853
|
responses: {
|
|
387
|
-
200: {
|
|
388
|
-
|
|
389
|
-
|
|
854
|
+
200: {
|
|
855
|
+
bodyMapper: Mappers.AsyncOperationResult
|
|
856
|
+
},
|
|
390
857
|
default: {
|
|
391
858
|
bodyMapper: Mappers.ErrorResponse
|
|
392
859
|
}
|
|
393
860
|
},
|
|
861
|
+
queryParameters: [Parameters.apiVersion],
|
|
862
|
+
urlParameters: [
|
|
863
|
+
Parameters.$host,
|
|
864
|
+
Parameters.subscriptionId,
|
|
865
|
+
Parameters.resourceGroupName,
|
|
866
|
+
Parameters.clusterName,
|
|
867
|
+
Parameters.operationId,
|
|
868
|
+
Parameters.extensionName
|
|
869
|
+
],
|
|
870
|
+
headerParameters: [Parameters.accept],
|
|
394
871
|
serializer
|
|
395
872
|
};
|