@azure/arm-hdinsight 1.2.2-alpha.20230627.1 → 1.3.0-beta.1
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 +6 -10
- package/README.md +1 -1
- package/dist/index.js +3489 -3399
- 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.js +1 -1
- package/dist-esm/samples-dev/applicationsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/applicationsGetAzureAsyncOperationStatusSample.js +1 -1
- package/dist-esm/samples-dev/applicationsGetSample.js +2 -2
- package/dist-esm/samples-dev/applicationsListByClusterSample.js +1 -1
- package/dist-esm/samples-dev/clustersCreateSample.js +26 -13
- package/dist-esm/samples-dev/clustersCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/clustersDeleteSample.js +1 -1
- package/dist-esm/samples-dev/clustersExecuteScriptActionsSample.js +1 -1
- package/dist-esm/samples-dev/clustersGetAzureAsyncOperationStatusSample.js +1 -1
- package/dist-esm/samples-dev/clustersGetGatewaySettingsSample.js +1 -1
- package/dist-esm/samples-dev/clustersGetSample.js +2 -2
- package/dist-esm/samples-dev/clustersListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/clustersListSample.js +1 -1
- package/dist-esm/samples-dev/clustersResizeSample.js +1 -1
- package/dist-esm/samples-dev/clustersRotateDiskEncryptionKeySample.js +1 -1
- package/dist-esm/samples-dev/clustersUpdateAutoScaleConfigurationSample.js +3 -3
- package/dist-esm/samples-dev/clustersUpdateGatewaySettingsSample.js +1 -1
- package/dist-esm/samples-dev/clustersUpdateIdentityCertificateSample.js +1 -1
- package/dist-esm/samples-dev/clustersUpdateSample.js +1 -1
- package/dist-esm/samples-dev/configurationsGetSample.js +1 -1
- package/dist-esm/samples-dev/configurationsListSample.js +1 -1
- package/dist-esm/samples-dev/configurationsUpdateSample.js +2 -2
- package/dist-esm/samples-dev/extensionsCreateSample.js +1 -1
- package/dist-esm/samples-dev/extensionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/extensionsDisableAzureMonitorSample.js +1 -1
- package/dist-esm/samples-dev/extensionsDisableMonitoringSample.js +1 -1
- package/dist-esm/samples-dev/extensionsEnableAzureMonitorSample.js +1 -1
- package/dist-esm/samples-dev/extensionsEnableMonitoringSample.js +1 -1
- package/dist-esm/samples-dev/extensionsGetAzureAsyncOperationStatusSample.js +1 -1
- package/dist-esm/samples-dev/extensionsGetAzureMonitorStatusSample.js +1 -1
- package/dist-esm/samples-dev/extensionsGetMonitoringStatusSample.js +1 -1
- package/dist-esm/samples-dev/extensionsGetSample.js +1 -1
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.js +1 -1
- package/dist-esm/samples-dev/locationsGetAzureAsyncOperationStatusSample.js +1 -1
- package/dist-esm/samples-dev/locationsGetCapabilitiesSample.js +1 -1
- package/dist-esm/samples-dev/locationsListBillingSpecsSample.js +1 -1
- package/dist-esm/samples-dev/locationsListUsagesSample.js +1 -1
- package/dist-esm/samples-dev/locationsValidateClusterCreateRequestSample.js +2 -1
- package/dist-esm/samples-dev/locationsValidateClusterCreateRequestSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +58 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListByClusterSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js +1 -1
- package/dist-esm/samples-dev/scriptActionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/scriptActionsGetExecutionAsyncOperationStatusSample.js +1 -1
- package/dist-esm/samples-dev/scriptActionsGetExecutionDetailSample.js +1 -1
- package/dist-esm/samples-dev/scriptActionsListByClusterSample.js +1 -1
- package/dist-esm/samples-dev/scriptExecutionHistoryListByClusterSample.js +1 -1
- package/dist-esm/samples-dev/scriptExecutionHistoryPromoteSample.js +1 -1
- package/dist-esm/samples-dev/virtualMachinesGetAsyncOperationStatusSample.js +1 -1
- package/dist-esm/samples-dev/virtualMachinesListHostsSample.js +1 -1
- package/dist-esm/samples-dev/virtualMachinesRestartHostsSample.js +1 -1
- package/dist-esm/src/hDInsightManagementClient.d.ts +6 -6
- package/dist-esm/src/hDInsightManagementClient.d.ts.map +1 -1
- package/dist-esm/src/hDInsightManagementClient.js +8 -8
- package/dist-esm/src/hDInsightManagementClient.js.map +1 -1
- package/dist-esm/src/lroImpl.d.ts +6 -11
- package/dist-esm/src/lroImpl.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +12 -20
- package/dist-esm/src/lroImpl.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +696 -694
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +62 -62
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +35 -35
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +1451 -1445
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +12 -12
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +91 -91
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/applications.d.ts +3 -3
- package/dist-esm/src/operations/applications.d.ts.map +1 -1
- package/dist-esm/src/operations/applications.js +30 -16
- package/dist-esm/src/operations/applications.js.map +1 -1
- package/dist-esm/src/operations/clusters.d.ts +9 -9
- package/dist-esm/src/operations/clusters.d.ts.map +1 -1
- package/dist-esm/src/operations/clusters.js +90 -58
- package/dist-esm/src/operations/clusters.js.map +1 -1
- package/dist-esm/src/operations/configurations.d.ts +2 -2
- package/dist-esm/src/operations/configurations.d.ts.map +1 -1
- package/dist-esm/src/operations/configurations.js +19 -15
- package/dist-esm/src/operations/configurations.js.map +1 -1
- package/dist-esm/src/operations/extensions.d.ts +7 -7
- package/dist-esm/src/operations/extensions.d.ts.map +1 -1
- package/dist-esm/src/operations/extensions.js +68 -38
- package/dist-esm/src/operations/extensions.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +5 -5
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +5 -5
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/locations.js +4 -4
- package/dist-esm/src/operations/locations.js.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +3 -3
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +32 -24
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/virtualMachines.d.ts +2 -2
- package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -1
- package/dist-esm/src/operations/virtualMachines.js +12 -8
- package/dist-esm/src/operations/virtualMachines.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/applications.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/applications.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/clusters.d.ts +9 -9
- package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/configurations.d.ts +2 -2
- package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/extensions.d.ts +7 -7
- package/dist-esm/src/operationsInterfaces/extensions.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +5 -5
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +5 -5
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts +2 -2
- package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts.map +1 -1
- package/dist-esm/test/hdinsights_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/hdinsights_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/hdinsights_operations_test.spec.js +86 -0
- package/dist-esm/test/hdinsights_operations_test.spec.js.map +1 -0
- package/package.json +7 -7
- package/review/arm-hdinsight.api.md +23 -22
- package/src/hDInsightManagementClient.ts +24 -24
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +838 -836
- package/src/models/mappers.ts +1559 -1553
- package/src/models/parameters.ts +101 -101
- package/src/operations/applications.ts +40 -27
- package/src/operations/clusters.ts +106 -99
- package/src/operations/configurations.ts +18 -14
- package/src/operations/extensions.ts +78 -68
- package/src/operations/index.ts +5 -5
- package/src/operations/locations.ts +4 -4
- package/src/operations/privateEndpointConnections.ts +31 -24
- package/src/operations/virtualMachines.ts +17 -13
- package/src/operationsInterfaces/applications.ts +4 -4
- package/src/operationsInterfaces/clusters.ts +10 -10
- package/src/operationsInterfaces/configurations.ts +2 -2
- package/src/operationsInterfaces/extensions.ts +7 -7
- package/src/operationsInterfaces/index.ts +5 -5
- package/src/operationsInterfaces/privateEndpointConnections.ts +4 -4
- package/src/operationsInterfaces/virtualMachines.ts +2 -2
- package/types/arm-hdinsight.d.ts +29 -27
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hdinsights_operations_test.spec.d.ts","sourceRoot":"","sources":["../../test/hdinsights_operations_test.spec.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { __asyncValues, __awaiter } from "tslib";
|
|
9
|
+
import { env, Recorder, isPlaybackMode, } from "@azure-tools/test-recorder";
|
|
10
|
+
import { createTestCredential } from "@azure-tools/test-credential";
|
|
11
|
+
import { assert } from "chai";
|
|
12
|
+
import { HDInsightManagementClient } from "../src/hDInsightManagementClient";
|
|
13
|
+
const replaceableVariables = {
|
|
14
|
+
AZURE_CLIENT_ID: "azure_client_id",
|
|
15
|
+
AZURE_CLIENT_SECRET: "azure_client_secret",
|
|
16
|
+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
|
17
|
+
SUBSCRIPTION_ID: "azure_subscription_id"
|
|
18
|
+
};
|
|
19
|
+
const recorderOptions = {
|
|
20
|
+
envSetupForPlayback: replaceableVariables
|
|
21
|
+
};
|
|
22
|
+
export const testPollingOptions = {
|
|
23
|
+
updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
|
|
24
|
+
};
|
|
25
|
+
describe("hdinsights test", () => {
|
|
26
|
+
let recorder;
|
|
27
|
+
let subscriptionId;
|
|
28
|
+
let client;
|
|
29
|
+
let location;
|
|
30
|
+
let resourceGroup;
|
|
31
|
+
let resourcename;
|
|
32
|
+
beforeEach(function () {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
recorder = new Recorder(this.currentTest);
|
|
35
|
+
yield recorder.start(recorderOptions);
|
|
36
|
+
subscriptionId = env.SUBSCRIPTION_ID || '';
|
|
37
|
+
// This is an example of how the environment variables are used
|
|
38
|
+
const credential = createTestCredential();
|
|
39
|
+
client = new HDInsightManagementClient(credential, subscriptionId, recorder.configureClientOptions({}));
|
|
40
|
+
location = "eastus";
|
|
41
|
+
resourceGroup = "myjstest";
|
|
42
|
+
resourcename = "resourcetest";
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
afterEach(function () {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
yield recorder.stop();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
it("locations checkNameAvailability test", function () {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const res = yield client.locations.checkNameAvailability(location, {
|
|
53
|
+
name: "test123",
|
|
54
|
+
type: "clusters"
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
it("operation list test", function () {
|
|
59
|
+
var _a, e_1, _b, _c;
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const resArray = new Array();
|
|
62
|
+
try {
|
|
63
|
+
for (var _d = true, _e = __asyncValues(client.operations.list()), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
64
|
+
_c = _f.value;
|
|
65
|
+
_d = false;
|
|
66
|
+
try {
|
|
67
|
+
let item = _c;
|
|
68
|
+
resArray.push(item);
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
_d = true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
76
|
+
finally {
|
|
77
|
+
try {
|
|
78
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
79
|
+
}
|
|
80
|
+
finally { if (e_1) throw e_1.error; }
|
|
81
|
+
}
|
|
82
|
+
assert.notEqual(resArray.length, 0);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=hdinsights_operations_test.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hdinsights_operations_test.spec.js","sourceRoot":"","sources":["../../test/hdinsights_operations_test.spec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,GAAG,EACH,QAAQ,EAGR,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,sCAAsC;IACvD,eAAe,EAAE,uBAAuB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAyB;IAC5C,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;CACrD,CAAC;AAEF,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,IAAI,QAAkB,CAAC;IACvB,IAAI,cAAsB,CAAC;IAC3B,IAAI,MAAiC,CAAC;IACtC,IAAI,QAAgB,CAAC;IACrB,IAAI,aAAqB,CAAC;IAC1B,IAAI,YAAoB,CAAC;IAEzB,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YACtC,cAAc,GAAG,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;YAC3C,+DAA+D;YAC/D,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;YAC1C,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC;YACxG,QAAQ,GAAG,QAAQ,CAAC;YACpB,aAAa,GAAG,UAAU,CAAC;YAC3B,YAAY,GAAG,cAAc,CAAC;QAEhC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE;;YACzC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,qBAAqB,CACtD,QAAQ,EACR;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,UAAU;aACjB,CAAC,CAAC;QACP,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,qBAAqB,EAAE;;;YACxB,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;gBAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA,IAAA;oBAAxB,cAAwB;oBAAxB,WAAwB;;wBAApC,IAAI,IAAI,KAAA,CAAA;wBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;iBACrB;;;;;;;;;YACD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;;KACrC,CAAC,CAAC;AACL,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for HDInsightManagementClient.",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.3.0-beta.1",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=14.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@azure/core-lro": "^2.
|
|
11
|
+
"@azure/core-lro": "^2.5.3",
|
|
12
12
|
"@azure/abort-controller": "^1.0.0",
|
|
13
13
|
"@azure/core-paging": "^1.2.0",
|
|
14
|
-
"@azure/core-client": "^1.
|
|
14
|
+
"@azure/core-client": "^1.7.0",
|
|
15
15
|
"@azure/core-auth": "^1.3.0",
|
|
16
16
|
"@azure/core-rest-pipeline": "^1.8.0",
|
|
17
17
|
"tslib": "^2.2.0"
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@rollup/plugin-json": "^6.0.0",
|
|
34
34
|
"@rollup/plugin-multi-entry": "^6.0.0",
|
|
35
35
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
36
|
-
"mkdirp": "^1.
|
|
36
|
+
"mkdirp": "^2.1.2",
|
|
37
37
|
"rollup": "^2.66.1",
|
|
38
38
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
39
39
|
"typescript": "~5.0.0",
|
|
40
40
|
"uglify-js": "^3.4.9",
|
|
41
41
|
"rimraf": "^3.0.0",
|
|
42
|
-
"dotenv": "^
|
|
42
|
+
"dotenv": "^16.0.0",
|
|
43
43
|
"@azure/identity": "^2.0.1",
|
|
44
44
|
"@azure-tools/test-recorder": "^3.0.0",
|
|
45
45
|
"@azure-tools/test-credential": "^1.0.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"chai": "^4.2.0",
|
|
49
49
|
"cross-env": "^7.0.2",
|
|
50
50
|
"@types/node": "^14.0.0",
|
|
51
|
-
"@azure/dev-tool": "
|
|
51
|
+
"@azure/dev-tool": "^1.0.0"
|
|
52
52
|
},
|
|
53
53
|
"repository": {
|
|
54
54
|
"type": "git",
|
|
@@ -120,4 +120,4 @@
|
|
|
120
120
|
"disableDocsMs": true,
|
|
121
121
|
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-hdinsight?view=azure-node-preview"
|
|
122
122
|
}
|
|
123
|
-
}
|
|
123
|
+
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
import * as coreAuth from '@azure/core-auth';
|
|
8
8
|
import * as coreClient from '@azure/core-client';
|
|
9
|
+
import { OperationState } from '@azure/core-lro';
|
|
9
10
|
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
10
|
-
import {
|
|
11
|
-
import { PollOperationState } from '@azure/core-lro';
|
|
11
|
+
import { SimplePollerLike } from '@azure/core-lro';
|
|
12
12
|
|
|
13
13
|
// @public
|
|
14
14
|
export interface AaddsResourceDetails {
|
|
@@ -74,9 +74,9 @@ export interface ApplicationProperties {
|
|
|
74
74
|
|
|
75
75
|
// @public
|
|
76
76
|
export interface Applications {
|
|
77
|
-
beginCreate(resourceGroupName: string, clusterName: string, applicationName: string, parameters: Application, options?: ApplicationsCreateOptionalParams): Promise<
|
|
77
|
+
beginCreate(resourceGroupName: string, clusterName: string, applicationName: string, parameters: Application, options?: ApplicationsCreateOptionalParams): Promise<SimplePollerLike<OperationState<ApplicationsCreateResponse>, ApplicationsCreateResponse>>;
|
|
78
78
|
beginCreateAndWait(resourceGroupName: string, clusterName: string, applicationName: string, parameters: Application, options?: ApplicationsCreateOptionalParams): Promise<ApplicationsCreateResponse>;
|
|
79
|
-
beginDelete(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams): Promise<
|
|
79
|
+
beginDelete(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
80
80
|
beginDeleteAndWait(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams): Promise<void>;
|
|
81
81
|
get(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsGetOptionalParams): Promise<ApplicationsGetResponse>;
|
|
82
82
|
getAzureAsyncOperationStatus(resourceGroupName: string, clusterName: string, applicationName: string, operationId: string, options?: ApplicationsGetAzureAsyncOperationStatusOptionalParams): Promise<ApplicationsGetAzureAsyncOperationStatusResponse>;
|
|
@@ -396,21 +396,21 @@ export interface ClusterResizeParameters {
|
|
|
396
396
|
|
|
397
397
|
// @public
|
|
398
398
|
export interface Clusters {
|
|
399
|
-
beginCreate(resourceGroupName: string, clusterName: string, parameters: ClusterCreateParametersExtended, options?: ClustersCreateOptionalParams): Promise<
|
|
399
|
+
beginCreate(resourceGroupName: string, clusterName: string, parameters: ClusterCreateParametersExtended, options?: ClustersCreateOptionalParams): Promise<SimplePollerLike<OperationState<ClustersCreateResponse>, ClustersCreateResponse>>;
|
|
400
400
|
beginCreateAndWait(resourceGroupName: string, clusterName: string, parameters: ClusterCreateParametersExtended, options?: ClustersCreateOptionalParams): Promise<ClustersCreateResponse>;
|
|
401
|
-
beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise<
|
|
401
|
+
beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
402
402
|
beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise<void>;
|
|
403
|
-
beginExecuteScriptActions(resourceGroupName: string, clusterName: string, parameters: ExecuteScriptActionParameters, options?: ClustersExecuteScriptActionsOptionalParams): Promise<
|
|
403
|
+
beginExecuteScriptActions(resourceGroupName: string, clusterName: string, parameters: ExecuteScriptActionParameters, options?: ClustersExecuteScriptActionsOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
404
404
|
beginExecuteScriptActionsAndWait(resourceGroupName: string, clusterName: string, parameters: ExecuteScriptActionParameters, options?: ClustersExecuteScriptActionsOptionalParams): Promise<void>;
|
|
405
|
-
beginResize(resourceGroupName: string, clusterName: string, roleName: RoleName, parameters: ClusterResizeParameters, options?: ClustersResizeOptionalParams): Promise<
|
|
405
|
+
beginResize(resourceGroupName: string, clusterName: string, roleName: RoleName, parameters: ClusterResizeParameters, options?: ClustersResizeOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
406
406
|
beginResizeAndWait(resourceGroupName: string, clusterName: string, roleName: RoleName, parameters: ClusterResizeParameters, options?: ClustersResizeOptionalParams): Promise<void>;
|
|
407
|
-
beginRotateDiskEncryptionKey(resourceGroupName: string, clusterName: string, parameters: ClusterDiskEncryptionParameters, options?: ClustersRotateDiskEncryptionKeyOptionalParams): Promise<
|
|
407
|
+
beginRotateDiskEncryptionKey(resourceGroupName: string, clusterName: string, parameters: ClusterDiskEncryptionParameters, options?: ClustersRotateDiskEncryptionKeyOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
408
408
|
beginRotateDiskEncryptionKeyAndWait(resourceGroupName: string, clusterName: string, parameters: ClusterDiskEncryptionParameters, options?: ClustersRotateDiskEncryptionKeyOptionalParams): Promise<void>;
|
|
409
|
-
beginUpdateAutoScaleConfiguration(resourceGroupName: string, clusterName: string, roleName: RoleName, parameters: AutoscaleConfigurationUpdateParameter, options?: ClustersUpdateAutoScaleConfigurationOptionalParams): Promise<
|
|
409
|
+
beginUpdateAutoScaleConfiguration(resourceGroupName: string, clusterName: string, roleName: RoleName, parameters: AutoscaleConfigurationUpdateParameter, options?: ClustersUpdateAutoScaleConfigurationOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
410
410
|
beginUpdateAutoScaleConfigurationAndWait(resourceGroupName: string, clusterName: string, roleName: RoleName, parameters: AutoscaleConfigurationUpdateParameter, options?: ClustersUpdateAutoScaleConfigurationOptionalParams): Promise<void>;
|
|
411
|
-
beginUpdateGatewaySettings(resourceGroupName: string, clusterName: string, parameters: UpdateGatewaySettingsParameters, options?: ClustersUpdateGatewaySettingsOptionalParams): Promise<
|
|
411
|
+
beginUpdateGatewaySettings(resourceGroupName: string, clusterName: string, parameters: UpdateGatewaySettingsParameters, options?: ClustersUpdateGatewaySettingsOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
412
412
|
beginUpdateGatewaySettingsAndWait(resourceGroupName: string, clusterName: string, parameters: UpdateGatewaySettingsParameters, options?: ClustersUpdateGatewaySettingsOptionalParams): Promise<void>;
|
|
413
|
-
beginUpdateIdentityCertificate(resourceGroupName: string, clusterName: string, parameters: UpdateClusterIdentityCertificateParameters, options?: ClustersUpdateIdentityCertificateOptionalParams): Promise<
|
|
413
|
+
beginUpdateIdentityCertificate(resourceGroupName: string, clusterName: string, parameters: UpdateClusterIdentityCertificateParameters, options?: ClustersUpdateIdentityCertificateOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
414
414
|
beginUpdateIdentityCertificateAndWait(resourceGroupName: string, clusterName: string, parameters: UpdateClusterIdentityCertificateParameters, options?: ClustersUpdateIdentityCertificateOptionalParams): Promise<void>;
|
|
415
415
|
get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise<ClustersGetResponse>;
|
|
416
416
|
getAzureAsyncOperationStatus(resourceGroupName: string, clusterName: string, operationId: string, options?: ClustersGetAzureAsyncOperationStatusOptionalParams): Promise<ClustersGetAzureAsyncOperationStatusResponse>;
|
|
@@ -542,7 +542,7 @@ export interface ComputeProfile {
|
|
|
542
542
|
export interface Configurations {
|
|
543
543
|
beginUpdate(resourceGroupName: string, clusterName: string, configurationName: string, parameters: {
|
|
544
544
|
[propertyName: string]: string;
|
|
545
|
-
}, options?: ConfigurationsUpdateOptionalParams): Promise<
|
|
545
|
+
}, options?: ConfigurationsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
546
546
|
beginUpdateAndWait(resourceGroupName: string, clusterName: string, configurationName: string, parameters: {
|
|
547
547
|
[propertyName: string]: string;
|
|
548
548
|
}, options?: ConfigurationsUpdateOptionalParams): Promise<void>;
|
|
@@ -659,17 +659,17 @@ export interface Extension {
|
|
|
659
659
|
|
|
660
660
|
// @public
|
|
661
661
|
export interface Extensions {
|
|
662
|
-
beginCreate(resourceGroupName: string, clusterName: string, extensionName: string, parameters: Extension, options?: ExtensionsCreateOptionalParams): Promise<
|
|
662
|
+
beginCreate(resourceGroupName: string, clusterName: string, extensionName: string, parameters: Extension, options?: ExtensionsCreateOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
663
663
|
beginCreateAndWait(resourceGroupName: string, clusterName: string, extensionName: string, parameters: Extension, options?: ExtensionsCreateOptionalParams): Promise<void>;
|
|
664
|
-
beginDelete(resourceGroupName: string, clusterName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams): Promise<
|
|
664
|
+
beginDelete(resourceGroupName: string, clusterName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
665
665
|
beginDeleteAndWait(resourceGroupName: string, clusterName: string, extensionName: string, options?: ExtensionsDeleteOptionalParams): Promise<void>;
|
|
666
|
-
beginDisableAzureMonitor(resourceGroupName: string, clusterName: string, options?: ExtensionsDisableAzureMonitorOptionalParams): Promise<
|
|
666
|
+
beginDisableAzureMonitor(resourceGroupName: string, clusterName: string, options?: ExtensionsDisableAzureMonitorOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
667
667
|
beginDisableAzureMonitorAndWait(resourceGroupName: string, clusterName: string, options?: ExtensionsDisableAzureMonitorOptionalParams): Promise<void>;
|
|
668
|
-
beginDisableMonitoring(resourceGroupName: string, clusterName: string, options?: ExtensionsDisableMonitoringOptionalParams): Promise<
|
|
668
|
+
beginDisableMonitoring(resourceGroupName: string, clusterName: string, options?: ExtensionsDisableMonitoringOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
669
669
|
beginDisableMonitoringAndWait(resourceGroupName: string, clusterName: string, options?: ExtensionsDisableMonitoringOptionalParams): Promise<void>;
|
|
670
|
-
beginEnableAzureMonitor(resourceGroupName: string, clusterName: string, parameters: AzureMonitorRequest, options?: ExtensionsEnableAzureMonitorOptionalParams): Promise<
|
|
670
|
+
beginEnableAzureMonitor(resourceGroupName: string, clusterName: string, parameters: AzureMonitorRequest, options?: ExtensionsEnableAzureMonitorOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
671
671
|
beginEnableAzureMonitorAndWait(resourceGroupName: string, clusterName: string, parameters: AzureMonitorRequest, options?: ExtensionsEnableAzureMonitorOptionalParams): Promise<void>;
|
|
672
|
-
beginEnableMonitoring(resourceGroupName: string, clusterName: string, parameters: ClusterMonitoringRequest, options?: ExtensionsEnableMonitoringOptionalParams): Promise<
|
|
672
|
+
beginEnableMonitoring(resourceGroupName: string, clusterName: string, parameters: ClusterMonitoringRequest, options?: ExtensionsEnableMonitoringOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
673
673
|
beginEnableMonitoringAndWait(resourceGroupName: string, clusterName: string, parameters: ClusterMonitoringRequest, options?: ExtensionsEnableMonitoringOptionalParams): Promise<void>;
|
|
674
674
|
get(resourceGroupName: string, clusterName: string, extensionName: string, options?: ExtensionsGetOptionalParams): Promise<ExtensionsGetResponse>;
|
|
675
675
|
getAzureAsyncOperationStatus(resourceGroupName: string, clusterName: string, extensionName: string, operationId: string, options?: ExtensionsGetAzureAsyncOperationStatusOptionalParams): Promise<ExtensionsGetAzureAsyncOperationStatusResponse>;
|
|
@@ -1140,9 +1140,9 @@ export type PrivateEndpointConnectionProvisioningState = string;
|
|
|
1140
1140
|
|
|
1141
1141
|
// @public
|
|
1142
1142
|
export interface PrivateEndpointConnections {
|
|
1143
|
-
beginCreateOrUpdate(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise<
|
|
1143
|
+
beginCreateOrUpdate(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<PrivateEndpointConnectionsCreateOrUpdateResponse>, PrivateEndpointConnectionsCreateOrUpdateResponse>>;
|
|
1144
1144
|
beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse>;
|
|
1145
|
-
beginDelete(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<
|
|
1145
|
+
beginDelete(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
1146
1146
|
beginDeleteAndWait(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<void>;
|
|
1147
1147
|
get(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise<PrivateEndpointConnectionsGetResponse>;
|
|
1148
1148
|
listByCluster(resourceGroupName: string, clusterName: string, options?: PrivateEndpointConnectionsListByClusterOptionalParams): PagedAsyncIterableIterator<PrivateEndpointConnection>;
|
|
@@ -1466,6 +1466,7 @@ export interface SshPublicKey {
|
|
|
1466
1466
|
// @public
|
|
1467
1467
|
export interface StorageAccount {
|
|
1468
1468
|
container?: string;
|
|
1469
|
+
enableSecureChannel?: boolean;
|
|
1469
1470
|
fileshare?: string;
|
|
1470
1471
|
fileSystem?: string;
|
|
1471
1472
|
isDefault?: boolean;
|
|
@@ -1561,7 +1562,7 @@ export interface VersionSpec {
|
|
|
1561
1562
|
|
|
1562
1563
|
// @public
|
|
1563
1564
|
export interface VirtualMachines {
|
|
1564
|
-
beginRestartHosts(resourceGroupName: string, clusterName: string, hosts: string[], options?: VirtualMachinesRestartHostsOptionalParams): Promise<
|
|
1565
|
+
beginRestartHosts(resourceGroupName: string, clusterName: string, hosts: string[], options?: VirtualMachinesRestartHostsOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
1565
1566
|
beginRestartHostsAndWait(resourceGroupName: string, clusterName: string, hosts: string[], options?: VirtualMachinesRestartHostsOptionalParams): Promise<void>;
|
|
1566
1567
|
getAsyncOperationStatus(resourceGroupName: string, clusterName: string, operationId: string, options?: VirtualMachinesGetAsyncOperationStatusOptionalParams): Promise<VirtualMachinesGetAsyncOperationStatusResponse>;
|
|
1567
1568
|
listHosts(resourceGroupName: string, clusterName: string, options?: VirtualMachinesListHostsOptionalParams): Promise<VirtualMachinesListHostsResponse>;
|
|
@@ -15,30 +15,30 @@ import {
|
|
|
15
15
|
} from "@azure/core-rest-pipeline";
|
|
16
16
|
import * as coreAuth from "@azure/core-auth";
|
|
17
17
|
import {
|
|
18
|
-
ClustersImpl,
|
|
19
18
|
ApplicationsImpl,
|
|
20
|
-
|
|
19
|
+
ClustersImpl,
|
|
21
20
|
ConfigurationsImpl,
|
|
22
21
|
ExtensionsImpl,
|
|
23
|
-
|
|
24
|
-
ScriptExecutionHistoryImpl,
|
|
22
|
+
LocationsImpl,
|
|
25
23
|
OperationsImpl,
|
|
26
|
-
VirtualMachinesImpl,
|
|
27
24
|
PrivateEndpointConnectionsImpl,
|
|
28
|
-
PrivateLinkResourcesImpl
|
|
25
|
+
PrivateLinkResourcesImpl,
|
|
26
|
+
ScriptActionsImpl,
|
|
27
|
+
ScriptExecutionHistoryImpl,
|
|
28
|
+
VirtualMachinesImpl
|
|
29
29
|
} from "./operations";
|
|
30
30
|
import {
|
|
31
|
-
Clusters,
|
|
32
31
|
Applications,
|
|
33
|
-
|
|
32
|
+
Clusters,
|
|
34
33
|
Configurations,
|
|
35
34
|
Extensions,
|
|
36
|
-
|
|
37
|
-
ScriptExecutionHistory,
|
|
35
|
+
Locations,
|
|
38
36
|
Operations,
|
|
39
|
-
VirtualMachines,
|
|
40
37
|
PrivateEndpointConnections,
|
|
41
|
-
PrivateLinkResources
|
|
38
|
+
PrivateLinkResources,
|
|
39
|
+
ScriptActions,
|
|
40
|
+
ScriptExecutionHistory,
|
|
41
|
+
VirtualMachines
|
|
42
42
|
} from "./operationsInterfaces";
|
|
43
43
|
import { HDInsightManagementClientOptionalParams } from "./models";
|
|
44
44
|
|
|
@@ -75,7 +75,7 @@ export class HDInsightManagementClient extends coreClient.ServiceClient {
|
|
|
75
75
|
credential: credentials
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
const packageDetails = `azsdk-js-arm-hdinsight/1.
|
|
78
|
+
const packageDetails = `azsdk-js-arm-hdinsight/1.3.0-beta.1`;
|
|
79
79
|
const userAgentPrefix =
|
|
80
80
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
81
81
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
@@ -128,18 +128,18 @@ export class HDInsightManagementClient extends coreClient.ServiceClient {
|
|
|
128
128
|
|
|
129
129
|
// Assigning values to Constant parameters
|
|
130
130
|
this.$host = options.$host || "https://management.azure.com";
|
|
131
|
-
this.apiVersion = options.apiVersion || "
|
|
132
|
-
this.clusters = new ClustersImpl(this);
|
|
131
|
+
this.apiVersion = options.apiVersion || "2023-04-15-preview";
|
|
133
132
|
this.applications = new ApplicationsImpl(this);
|
|
134
|
-
this.
|
|
133
|
+
this.clusters = new ClustersImpl(this);
|
|
135
134
|
this.configurations = new ConfigurationsImpl(this);
|
|
136
135
|
this.extensions = new ExtensionsImpl(this);
|
|
137
|
-
this.
|
|
138
|
-
this.scriptExecutionHistory = new ScriptExecutionHistoryImpl(this);
|
|
136
|
+
this.locations = new LocationsImpl(this);
|
|
139
137
|
this.operations = new OperationsImpl(this);
|
|
140
|
-
this.virtualMachines = new VirtualMachinesImpl(this);
|
|
141
138
|
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
|
142
139
|
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
|
|
140
|
+
this.scriptActions = new ScriptActionsImpl(this);
|
|
141
|
+
this.scriptExecutionHistory = new ScriptExecutionHistoryImpl(this);
|
|
142
|
+
this.virtualMachines = new VirtualMachinesImpl(this);
|
|
143
143
|
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -171,15 +171,15 @@ export class HDInsightManagementClient extends coreClient.ServiceClient {
|
|
|
171
171
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
clusters: Clusters;
|
|
175
174
|
applications: Applications;
|
|
176
|
-
|
|
175
|
+
clusters: Clusters;
|
|
177
176
|
configurations: Configurations;
|
|
178
177
|
extensions: Extensions;
|
|
179
|
-
|
|
180
|
-
scriptExecutionHistory: ScriptExecutionHistory;
|
|
178
|
+
locations: Locations;
|
|
181
179
|
operations: Operations;
|
|
182
|
-
virtualMachines: VirtualMachines;
|
|
183
180
|
privateEndpointConnections: PrivateEndpointConnections;
|
|
184
181
|
privateLinkResources: PrivateLinkResources;
|
|
182
|
+
scriptActions: ScriptActions;
|
|
183
|
+
scriptExecutionHistory: ScriptExecutionHistory;
|
|
184
|
+
virtualMachines: VirtualMachines;
|
|
185
185
|
}
|
package/src/lroImpl.ts
CHANGED
|
@@ -6,29 +6,37 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT license.
|
|
11
|
+
|
|
12
|
+
import { AbortSignalLike } from "@azure/abort-controller";
|
|
9
13
|
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
10
14
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...restSpec
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
export function createLroSpec<T>(inputs: {
|
|
16
|
+
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
|
|
17
|
+
args: Record<string, unknown>;
|
|
18
|
+
spec: {
|
|
19
|
+
readonly requestBody?: unknown;
|
|
20
|
+
readonly path?: string;
|
|
21
|
+
readonly httpMethod: string;
|
|
22
|
+
} & Record<string, any>;
|
|
23
|
+
}): LongRunningOperation<T> {
|
|
24
|
+
const { args, spec, sendOperationFn } = inputs;
|
|
25
|
+
return {
|
|
26
|
+
requestMethod: spec.httpMethod,
|
|
27
|
+
requestPath: spec.path!,
|
|
28
|
+
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
29
|
+
sendPollRequest: (
|
|
30
|
+
path: string,
|
|
31
|
+
options?: { abortSignal?: AbortSignalLike }
|
|
32
|
+
) => {
|
|
33
|
+
const { requestBody, ...restSpec } = spec;
|
|
34
|
+
return sendOperationFn(args, {
|
|
35
|
+
...restSpec,
|
|
36
|
+
httpMethod: "GET",
|
|
37
|
+
path,
|
|
38
|
+
abortSignal: options?.abortSignal
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
34
42
|
}
|