@azure/arm-hdinsight 0.24.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 -82
- 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/virtualMachinesMappers.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 +1516 -1670
- 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 +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- 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/configurationsMappers.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/virtualMachinesMappers.ts → dist-esm/src/operationsInterfaces/configurations.js} +2 -7
- 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/configurationsMappers.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 -32
- package/review/arm-hdinsight.api.md +1678 -0
- package/rollup.config.js +181 -30
- package/src/hDInsightManagementClient.ts +105 -53
- package/src/{models/scriptExecutionHistoryMappers.ts → index.ts} +4 -7
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +1810 -2954
- package/src/models/mappers.ts +1607 -1764
- package/src/models/parameters.ts +215 -53
- package/src/operations/applications.ts +376 -247
- package/src/operations/clusters.ts +1038 -649
- package/src/operations/configurations.ts +162 -154
- package/src/operations/extensions.ts +644 -410
- package/src/operations/index.ts +1 -2
- package/src/operations/locations.ts +143 -239
- package/src/operations/operations.ts +85 -73
- package/src/operations/privateEndpointConnections.ts +345 -182
- package/src/operations/privateLinkResources.ts +60 -92
- package/src/operations/scriptActions.ts +202 -206
- package/src/operations/scriptExecutionHistory.ts +155 -123
- package/src/operations/virtualMachines.ts +157 -154
- 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/src/operationsInterfaces/index.ts +19 -0
- 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 -7464
- 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 -35
- package/esm/hDInsightManagementClient.d.ts.map +0 -1
- package/esm/hDInsightManagementClient.js +0 -48
- package/esm/hDInsightManagementClient.js.map +0 -1
- package/esm/hDInsightManagementClientContext.d.ts +0 -23
- package/esm/hDInsightManagementClientContext.d.ts.map +0 -1
- package/esm/hDInsightManagementClientContext.js +0 -61
- 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 -3163
- 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 -113
- 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 -18
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -172
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
- package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.js +0 -9
- package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
- package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/privateLinkResourcesMappers.js +0 -9
- package/esm/models/privateLinkResourcesMappers.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 -142
- package/esm/operations/applications.d.ts.map +0 -1
- package/esm/operations/applications.js +0 -268
- package/esm/operations/applications.js.map +0 -1
- package/esm/operations/clusters.d.ts +0 -315
- package/esm/operations/clusters.d.ts.map +0 -1
- package/esm/operations/clusters.js +0 -710
- 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 -213
- package/esm/operations/extensions.d.ts.map +0 -1
- package/esm/operations/extensions.js +0 -477
- 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 -130
- package/esm/operations/locations.d.ts.map +0 -1
- package/esm/operations/locations.js +0 -213
- 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/privateEndpointConnections.d.ts +0 -115
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -236
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -58
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -90
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/esm/operations/scriptActions.d.ts +0 -124
- package/esm/operations/scriptActions.d.ts.map +0 -1
- package/esm/operations/scriptActions.js +0 -184
- 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 -77
- package/esm/operations/virtualMachines.d.ts.map +0 -1
- package/esm/operations/virtualMachines.js +0 -167
- package/esm/operations/virtualMachines.js.map +0 -1
- package/src/hDInsightManagementClientContext.ts +0 -68
- package/src/models/applicationsMappers.ts +0 -66
- package/src/models/clustersMappers.ts +0 -77
- package/src/models/extensionsMappers.ts +0 -20
- package/src/models/locationsMappers.ts +0 -66
- package/src/models/operationsMappers.ts +0 -18
- package/src/models/privateEndpointConnectionsMappers.ts +0 -65
- package/src/models/privateLinkResourcesMappers.ts +0 -65
- package/src/models/scriptActionsMappers.ts +0 -17
|
@@ -3,26 +3,33 @@
|
|
|
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/virtualMachinesMappers";
|
|
9
|
+
import { VirtualMachines } 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
|
+
VirtualMachinesListHostsOptionalParams,
|
|
18
|
+
VirtualMachinesListHostsResponse,
|
|
19
|
+
VirtualMachinesRestartHostsOptionalParams,
|
|
20
|
+
VirtualMachinesGetAsyncOperationStatusOptionalParams,
|
|
21
|
+
VirtualMachinesGetAsyncOperationStatusResponse
|
|
22
|
+
} from "../models";
|
|
16
23
|
|
|
17
|
-
/** Class
|
|
18
|
-
export class VirtualMachines {
|
|
19
|
-
private readonly client:
|
|
24
|
+
/** Class containing VirtualMachines operations. */
|
|
25
|
+
export class VirtualMachinesImpl implements VirtualMachines {
|
|
26
|
+
private readonly client: HDInsightManagementClient;
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
29
|
+
* Initialize a new instance of the class VirtualMachines class.
|
|
30
|
+
* @param client Reference to the service client
|
|
24
31
|
*/
|
|
25
|
-
constructor(client:
|
|
32
|
+
constructor(client: HDInsightManagementClient) {
|
|
26
33
|
this.client = client;
|
|
27
34
|
}
|
|
28
35
|
|
|
@@ -30,32 +37,17 @@ export class VirtualMachines {
|
|
|
30
37
|
* Lists the HDInsight clusters hosts
|
|
31
38
|
* @param resourceGroupName The name of the resource group.
|
|
32
39
|
* @param clusterName The name of the cluster.
|
|
33
|
-
* @param
|
|
34
|
-
* @returns Promise<Models.VirtualMachinesListHostsResponse>
|
|
40
|
+
* @param options The options parameters.
|
|
35
41
|
*/
|
|
36
|
-
listHosts(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
listHosts(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback<Models.HostInfo[]>): void;
|
|
43
|
-
/**
|
|
44
|
-
* @param resourceGroupName The name of the resource group.
|
|
45
|
-
* @param clusterName The name of the cluster.
|
|
46
|
-
* @param options The optional parameters
|
|
47
|
-
* @param callback The callback
|
|
48
|
-
*/
|
|
49
|
-
listHosts(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.HostInfo[]>): void;
|
|
50
|
-
listHosts(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.HostInfo[]>, callback?: msRest.ServiceCallback<Models.HostInfo[]>): Promise<Models.VirtualMachinesListHostsResponse> {
|
|
42
|
+
listHosts(
|
|
43
|
+
resourceGroupName: string,
|
|
44
|
+
clusterName: string,
|
|
45
|
+
options?: VirtualMachinesListHostsOptionalParams
|
|
46
|
+
): Promise<VirtualMachinesListHostsResponse> {
|
|
51
47
|
return this.client.sendOperationRequest(
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
options
|
|
56
|
-
},
|
|
57
|
-
listHostsOperationSpec,
|
|
58
|
-
callback) as Promise<Models.VirtualMachinesListHostsResponse>;
|
|
48
|
+
{ resourceGroupName, clusterName, options },
|
|
49
|
+
listHostsOperationSpec
|
|
50
|
+
);
|
|
59
51
|
}
|
|
60
52
|
|
|
61
53
|
/**
|
|
@@ -63,99 +55,119 @@ export class VirtualMachines {
|
|
|
63
55
|
* @param resourceGroupName The name of the resource group.
|
|
64
56
|
* @param clusterName The name of the cluster.
|
|
65
57
|
* @param hosts The list of hosts to restart
|
|
66
|
-
* @param
|
|
67
|
-
* @returns Promise<msRest.RestResponse>
|
|
58
|
+
* @param options The options parameters.
|
|
68
59
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
async beginRestartHosts(
|
|
61
|
+
resourceGroupName: string,
|
|
62
|
+
clusterName: string,
|
|
63
|
+
hosts: string[],
|
|
64
|
+
options?: VirtualMachinesRestartHostsOptionalParams
|
|
65
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
66
|
+
const directSendOperation = async (
|
|
67
|
+
args: coreClient.OperationArguments,
|
|
68
|
+
spec: coreClient.OperationSpec
|
|
69
|
+
): Promise<void> => {
|
|
70
|
+
return this.client.sendOperationRequest(args, spec);
|
|
71
|
+
};
|
|
72
|
+
const sendOperation = async (
|
|
73
|
+
args: coreClient.OperationArguments,
|
|
74
|
+
spec: coreClient.OperationSpec
|
|
75
|
+
) => {
|
|
76
|
+
let currentRawResponse:
|
|
77
|
+
| coreClient.FullOperationResponse
|
|
78
|
+
| undefined = undefined;
|
|
79
|
+
const providedCallback = args.options?.onResponse;
|
|
80
|
+
const callback: coreClient.RawResponseCallback = (
|
|
81
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
82
|
+
flatResponse: unknown
|
|
83
|
+
) => {
|
|
84
|
+
currentRawResponse = rawResponse;
|
|
85
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
86
|
+
};
|
|
87
|
+
const updatedArgs = {
|
|
88
|
+
...args,
|
|
89
|
+
options: {
|
|
90
|
+
...args.options,
|
|
91
|
+
onResponse: callback
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
95
|
+
return {
|
|
96
|
+
flatResponse,
|
|
97
|
+
rawResponse: {
|
|
98
|
+
statusCode: currentRawResponse!.status,
|
|
99
|
+
body: currentRawResponse!.parsedBody,
|
|
100
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const lro = new LroImpl(
|
|
106
|
+
sendOperation,
|
|
107
|
+
{ resourceGroupName, clusterName, hosts, options },
|
|
108
|
+
restartHostsOperationSpec
|
|
109
|
+
);
|
|
110
|
+
return new LroEngine(lro, {
|
|
111
|
+
resumeFrom: options?.resumeFrom,
|
|
112
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
113
|
+
lroResourceLocationConfig: "location"
|
|
114
|
+
});
|
|
72
115
|
}
|
|
73
116
|
|
|
74
117
|
/**
|
|
75
|
-
*
|
|
76
|
-
* @param resourceGroupName The name of the resource group.
|
|
77
|
-
* @param clusterName The name of the cluster.
|
|
78
|
-
* @param operationId The long running operation id.
|
|
79
|
-
* @param [options] The optional parameters
|
|
80
|
-
* @returns Promise<Models.VirtualMachinesGetAsyncOperationStatusResponse>
|
|
81
|
-
*/
|
|
82
|
-
getAsyncOperationStatus(resourceGroupName: string, clusterName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.VirtualMachinesGetAsyncOperationStatusResponse>;
|
|
83
|
-
/**
|
|
84
|
-
* @param resourceGroupName The name of the resource group.
|
|
85
|
-
* @param clusterName The name of the cluster.
|
|
86
|
-
* @param operationId The long running operation id.
|
|
87
|
-
* @param callback The callback
|
|
88
|
-
*/
|
|
89
|
-
getAsyncOperationStatus(resourceGroupName: string, clusterName: string, operationId: string, callback: msRest.ServiceCallback<Models.AsyncOperationResult>): void;
|
|
90
|
-
/**
|
|
118
|
+
* Restarts the specified HDInsight cluster hosts.
|
|
91
119
|
* @param resourceGroupName The name of the resource group.
|
|
92
120
|
* @param clusterName The name of the cluster.
|
|
93
|
-
* @param
|
|
94
|
-
* @param options The
|
|
95
|
-
* @param callback The callback
|
|
121
|
+
* @param hosts The list of hosts to restart
|
|
122
|
+
* @param options The options parameters.
|
|
96
123
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
124
|
+
async beginRestartHostsAndWait(
|
|
125
|
+
resourceGroupName: string,
|
|
126
|
+
clusterName: string,
|
|
127
|
+
hosts: string[],
|
|
128
|
+
options?: VirtualMachinesRestartHostsOptionalParams
|
|
129
|
+
): Promise<void> {
|
|
130
|
+
const poller = await this.beginRestartHosts(
|
|
131
|
+
resourceGroupName,
|
|
132
|
+
clusterName,
|
|
133
|
+
hosts,
|
|
134
|
+
options
|
|
135
|
+
);
|
|
136
|
+
return poller.pollUntilDone();
|
|
108
137
|
}
|
|
109
138
|
|
|
110
139
|
/**
|
|
111
|
-
*
|
|
140
|
+
* Gets the async operation status.
|
|
112
141
|
* @param resourceGroupName The name of the resource group.
|
|
113
142
|
* @param clusterName The name of the cluster.
|
|
114
|
-
* @param
|
|
115
|
-
* @param
|
|
116
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
143
|
+
* @param operationId The long running operation id.
|
|
144
|
+
* @param options The options parameters.
|
|
117
145
|
*/
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
|
|
146
|
+
getAsyncOperationStatus(
|
|
147
|
+
resourceGroupName: string,
|
|
148
|
+
clusterName: string,
|
|
149
|
+
operationId: string,
|
|
150
|
+
options?: VirtualMachinesGetAsyncOperationStatusOptionalParams
|
|
151
|
+
): Promise<VirtualMachinesGetAsyncOperationStatusResponse> {
|
|
152
|
+
return this.client.sendOperationRequest(
|
|
153
|
+
{ resourceGroupName, clusterName, operationId, options },
|
|
154
|
+
getAsyncOperationStatusOperationSpec
|
|
155
|
+
);
|
|
128
156
|
}
|
|
129
157
|
}
|
|
130
|
-
|
|
131
158
|
// Operation Specifications
|
|
132
|
-
const serializer =
|
|
133
|
-
|
|
159
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
160
|
+
|
|
161
|
+
const listHostsOperationSpec: coreClient.OperationSpec = {
|
|
162
|
+
path:
|
|
163
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/listHosts",
|
|
134
164
|
httpMethod: "POST",
|
|
135
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/listHosts",
|
|
136
|
-
urlParameters: [
|
|
137
|
-
Parameters.subscriptionId,
|
|
138
|
-
Parameters.resourceGroupName,
|
|
139
|
-
Parameters.clusterName
|
|
140
|
-
],
|
|
141
|
-
queryParameters: [
|
|
142
|
-
Parameters.apiVersion
|
|
143
|
-
],
|
|
144
|
-
headerParameters: [
|
|
145
|
-
Parameters.acceptLanguage
|
|
146
|
-
],
|
|
147
165
|
responses: {
|
|
148
166
|
200: {
|
|
149
167
|
bodyMapper: {
|
|
150
|
-
serializedName: "parsedResponse",
|
|
151
168
|
type: {
|
|
152
169
|
name: "Sequence",
|
|
153
|
-
element: {
|
|
154
|
-
type: {
|
|
155
|
-
name: "Composite",
|
|
156
|
-
className: "HostInfo"
|
|
157
|
-
}
|
|
158
|
-
}
|
|
170
|
+
element: { type: { name: "Composite", className: "HostInfo" } }
|
|
159
171
|
}
|
|
160
172
|
}
|
|
161
173
|
},
|
|
@@ -163,70 +175,61 @@ const listHostsOperationSpec: msRest.OperationSpec = {
|
|
|
163
175
|
bodyMapper: Mappers.ErrorResponse
|
|
164
176
|
}
|
|
165
177
|
},
|
|
166
|
-
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
const getAsyncOperationStatusOperationSpec: msRest.OperationSpec = {
|
|
170
|
-
httpMethod: "GET",
|
|
171
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts/azureasyncoperations/{operationId}",
|
|
178
|
+
queryParameters: [Parameters.apiVersion],
|
|
172
179
|
urlParameters: [
|
|
180
|
+
Parameters.$host,
|
|
173
181
|
Parameters.subscriptionId,
|
|
174
182
|
Parameters.resourceGroupName,
|
|
175
|
-
Parameters.clusterName
|
|
176
|
-
Parameters.operationId
|
|
177
|
-
],
|
|
178
|
-
queryParameters: [
|
|
179
|
-
Parameters.apiVersion
|
|
180
|
-
],
|
|
181
|
-
headerParameters: [
|
|
182
|
-
Parameters.acceptLanguage
|
|
183
|
+
Parameters.clusterName
|
|
183
184
|
],
|
|
185
|
+
headerParameters: [Parameters.accept],
|
|
186
|
+
serializer
|
|
187
|
+
};
|
|
188
|
+
const restartHostsOperationSpec: coreClient.OperationSpec = {
|
|
189
|
+
path:
|
|
190
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts",
|
|
191
|
+
httpMethod: "POST",
|
|
184
192
|
responses: {
|
|
185
|
-
200: {
|
|
186
|
-
|
|
187
|
-
},
|
|
193
|
+
200: {},
|
|
194
|
+
201: {},
|
|
195
|
+
202: {},
|
|
196
|
+
204: {},
|
|
188
197
|
default: {
|
|
189
198
|
bodyMapper: Mappers.ErrorResponse
|
|
190
199
|
}
|
|
191
200
|
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const beginRestartHostsOperationSpec: msRest.OperationSpec = {
|
|
196
|
-
httpMethod: "POST",
|
|
197
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts",
|
|
201
|
+
requestBody: Parameters.hosts,
|
|
202
|
+
queryParameters: [Parameters.apiVersion],
|
|
198
203
|
urlParameters: [
|
|
204
|
+
Parameters.$host,
|
|
199
205
|
Parameters.subscriptionId,
|
|
200
206
|
Parameters.resourceGroupName,
|
|
201
207
|
Parameters.clusterName
|
|
202
208
|
],
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
mapper: {
|
|
212
|
-
required: true,
|
|
213
|
-
serializedName: "hosts",
|
|
214
|
-
type: {
|
|
215
|
-
name: "Sequence",
|
|
216
|
-
element: {
|
|
217
|
-
type: {
|
|
218
|
-
name: "String"
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
},
|
|
209
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
210
|
+
mediaType: "json",
|
|
211
|
+
serializer
|
|
212
|
+
};
|
|
213
|
+
const getAsyncOperationStatusOperationSpec: coreClient.OperationSpec = {
|
|
214
|
+
path:
|
|
215
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts/azureasyncoperations/{operationId}",
|
|
216
|
+
httpMethod: "GET",
|
|
224
217
|
responses: {
|
|
225
|
-
200: {
|
|
226
|
-
|
|
218
|
+
200: {
|
|
219
|
+
bodyMapper: Mappers.AsyncOperationResult
|
|
220
|
+
},
|
|
227
221
|
default: {
|
|
228
222
|
bodyMapper: Mappers.ErrorResponse
|
|
229
223
|
}
|
|
230
224
|
},
|
|
225
|
+
queryParameters: [Parameters.apiVersion],
|
|
226
|
+
urlParameters: [
|
|
227
|
+
Parameters.$host,
|
|
228
|
+
Parameters.subscriptionId,
|
|
229
|
+
Parameters.resourceGroupName,
|
|
230
|
+
Parameters.clusterName,
|
|
231
|
+
Parameters.operationId
|
|
232
|
+
],
|
|
233
|
+
headerParameters: [Parameters.accept],
|
|
231
234
|
serializer
|
|
232
235
|
};
|
|
@@ -0,0 +1,126 @@
|
|
|
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
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|
11
|
+
import {
|
|
12
|
+
Application,
|
|
13
|
+
ApplicationsListByClusterOptionalParams,
|
|
14
|
+
ApplicationsGetOptionalParams,
|
|
15
|
+
ApplicationsGetResponse,
|
|
16
|
+
ApplicationsCreateOptionalParams,
|
|
17
|
+
ApplicationsCreateResponse,
|
|
18
|
+
ApplicationsDeleteOptionalParams,
|
|
19
|
+
ApplicationsGetAzureAsyncOperationStatusOptionalParams,
|
|
20
|
+
ApplicationsGetAzureAsyncOperationStatusResponse
|
|
21
|
+
} from "../models";
|
|
22
|
+
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Interface representing a Applications. */
|
|
25
|
+
export interface Applications {
|
|
26
|
+
/**
|
|
27
|
+
* Lists all of the applications for the HDInsight cluster.
|
|
28
|
+
* @param resourceGroupName The name of the resource group.
|
|
29
|
+
* @param clusterName The name of the cluster.
|
|
30
|
+
* @param options The options parameters.
|
|
31
|
+
*/
|
|
32
|
+
listByCluster(
|
|
33
|
+
resourceGroupName: string,
|
|
34
|
+
clusterName: string,
|
|
35
|
+
options?: ApplicationsListByClusterOptionalParams
|
|
36
|
+
): PagedAsyncIterableIterator<Application>;
|
|
37
|
+
/**
|
|
38
|
+
* Gets properties of the specified application.
|
|
39
|
+
* @param resourceGroupName The name of the resource group.
|
|
40
|
+
* @param clusterName The name of the cluster.
|
|
41
|
+
* @param applicationName The constant value for the application name.
|
|
42
|
+
* @param options The options parameters.
|
|
43
|
+
*/
|
|
44
|
+
get(
|
|
45
|
+
resourceGroupName: string,
|
|
46
|
+
clusterName: string,
|
|
47
|
+
applicationName: string,
|
|
48
|
+
options?: ApplicationsGetOptionalParams
|
|
49
|
+
): Promise<ApplicationsGetResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Creates applications for the HDInsight cluster.
|
|
52
|
+
* @param resourceGroupName The name of the resource group.
|
|
53
|
+
* @param clusterName The name of the cluster.
|
|
54
|
+
* @param applicationName The constant value for the application name.
|
|
55
|
+
* @param parameters The application create request.
|
|
56
|
+
* @param options The options parameters.
|
|
57
|
+
*/
|
|
58
|
+
beginCreate(
|
|
59
|
+
resourceGroupName: string,
|
|
60
|
+
clusterName: string,
|
|
61
|
+
applicationName: string,
|
|
62
|
+
parameters: Application,
|
|
63
|
+
options?: ApplicationsCreateOptionalParams
|
|
64
|
+
): Promise<
|
|
65
|
+
PollerLike<
|
|
66
|
+
PollOperationState<ApplicationsCreateResponse>,
|
|
67
|
+
ApplicationsCreateResponse
|
|
68
|
+
>
|
|
69
|
+
>;
|
|
70
|
+
/**
|
|
71
|
+
* Creates applications for the HDInsight cluster.
|
|
72
|
+
* @param resourceGroupName The name of the resource group.
|
|
73
|
+
* @param clusterName The name of the cluster.
|
|
74
|
+
* @param applicationName The constant value for the application name.
|
|
75
|
+
* @param parameters The application create request.
|
|
76
|
+
* @param options The options parameters.
|
|
77
|
+
*/
|
|
78
|
+
beginCreateAndWait(
|
|
79
|
+
resourceGroupName: string,
|
|
80
|
+
clusterName: string,
|
|
81
|
+
applicationName: string,
|
|
82
|
+
parameters: Application,
|
|
83
|
+
options?: ApplicationsCreateOptionalParams
|
|
84
|
+
): Promise<ApplicationsCreateResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Deletes the specified application on the HDInsight cluster.
|
|
87
|
+
* @param resourceGroupName The name of the resource group.
|
|
88
|
+
* @param clusterName The name of the cluster.
|
|
89
|
+
* @param applicationName The constant value for the application name.
|
|
90
|
+
* @param options The options parameters.
|
|
91
|
+
*/
|
|
92
|
+
beginDelete(
|
|
93
|
+
resourceGroupName: string,
|
|
94
|
+
clusterName: string,
|
|
95
|
+
applicationName: string,
|
|
96
|
+
options?: ApplicationsDeleteOptionalParams
|
|
97
|
+
): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
98
|
+
/**
|
|
99
|
+
* Deletes the specified application on the HDInsight cluster.
|
|
100
|
+
* @param resourceGroupName The name of the resource group.
|
|
101
|
+
* @param clusterName The name of the cluster.
|
|
102
|
+
* @param applicationName The constant value for the application name.
|
|
103
|
+
* @param options The options parameters.
|
|
104
|
+
*/
|
|
105
|
+
beginDeleteAndWait(
|
|
106
|
+
resourceGroupName: string,
|
|
107
|
+
clusterName: string,
|
|
108
|
+
applicationName: string,
|
|
109
|
+
options?: ApplicationsDeleteOptionalParams
|
|
110
|
+
): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Gets the async operation status.
|
|
113
|
+
* @param resourceGroupName The name of the resource group.
|
|
114
|
+
* @param clusterName The name of the cluster.
|
|
115
|
+
* @param applicationName The constant value for the application name.
|
|
116
|
+
* @param operationId The long running operation id.
|
|
117
|
+
* @param options The options parameters.
|
|
118
|
+
*/
|
|
119
|
+
getAzureAsyncOperationStatus(
|
|
120
|
+
resourceGroupName: string,
|
|
121
|
+
clusterName: string,
|
|
122
|
+
applicationName: string,
|
|
123
|
+
operationId: string,
|
|
124
|
+
options?: ApplicationsGetAzureAsyncOperationStatusOptionalParams
|
|
125
|
+
): Promise<ApplicationsGetAzureAsyncOperationStatusResponse>;
|
|
126
|
+
}
|