@azure/arm-hanaonazure 4.0.0-beta.1 → 4.0.0-beta.3
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 +2 -2
- package/README.md +12 -1
- package/dist/index.js +203 -58
- 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/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +43 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/providerInstancesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/providerInstancesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/providerInstancesCreateSample.js +37 -0
- package/dist-esm/samples-dev/providerInstancesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/providerInstancesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/providerInstancesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/providerInstancesDeleteSample.js +32 -0
- package/dist-esm/samples-dev/providerInstancesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/providerInstancesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/providerInstancesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/providerInstancesGetSample.js +32 -0
- package/dist-esm/samples-dev/providerInstancesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/providerInstancesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/providerInstancesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/providerInstancesListSample.js +45 -0
- package/dist-esm/samples-dev/providerInstancesListSample.js.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapMonitorsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsCreateSample.js +40 -0
- package/dist-esm/samples-dev/sapMonitorsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapMonitorsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/sapMonitorsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapMonitorsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsGetSample.js +31 -0
- package/dist-esm/samples-dev/sapMonitorsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapMonitorsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsListSample.js +43 -0
- package/dist-esm/samples-dev/sapMonitorsListSample.js.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapMonitorsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapMonitorsUpdateSample.js +51 -0
- package/dist-esm/samples-dev/sapMonitorsUpdateSample.js.map +1 -0
- package/dist-esm/src/hanaManagementClient.d.ts +2 -0
- package/dist-esm/src/hanaManagementClient.d.ts.map +1 -1
- package/dist-esm/src/hanaManagementClient.js +54 -5
- package/dist-esm/src/hanaManagementClient.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +15 -7
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +7 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +8 -4
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/providerInstances.d.ts.map +1 -1
- package/dist-esm/src/operations/providerInstances.js +25 -9
- package/dist-esm/src/operations/providerInstances.js.map +1 -1
- package/dist-esm/src/operations/sapMonitors.d.ts.map +1 -1
- package/dist-esm/src/operations/sapMonitors.js +25 -9
- package/dist-esm/src/operations/sapMonitors.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +51 -21
- package/review/arm-hanaonazure.api.md +18 -21
- package/rollup.config.js +6 -72
- package/src/hanaManagementClient.ts +70 -5
- package/src/index.ts +1 -0
- package/src/models/index.ts +14 -7
- package/src/operations/operations.ts +10 -5
- package/src/operations/providerInstances.ts +32 -10
- package/src/operations/sapMonitors.ts +27 -10
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +19 -5
- package/types/arm-hanaonazure.d.ts +26 -7
- package/types/tsdoc-metadata.json +1 -1
- package/LICENSE.txt +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 4.0.0-beta.
|
|
3
|
+
## 4.0.0-beta.3 (2022-11-23)
|
|
4
4
|
|
|
5
|
-
The package of @azure/arm-hanaonazure is using our next generation design principles since version 4.0.0-beta.
|
|
5
|
+
The package of @azure/arm-hanaonazure is using our next generation design principles since version 4.0.0-beta.3, which contains breaking changes.
|
|
6
6
|
|
|
7
7
|
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
|
8
8
|
|
package/README.md
CHANGED
|
@@ -13,9 +13,11 @@ HANA on Azure Client
|
|
|
13
13
|
|
|
14
14
|
### Currently supported environments
|
|
15
15
|
|
|
16
|
-
- [LTS versions of Node.js](https://
|
|
16
|
+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
18
|
|
|
19
|
+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
|
20
|
+
|
|
19
21
|
### Prerequisites
|
|
20
22
|
|
|
21
23
|
- An [Azure subscription][azure_sub].
|
|
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|
|
49
51
|
```javascript
|
|
50
52
|
const { HanaManagementClient } = require("@azure/arm-hanaonazure");
|
|
51
53
|
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
|
+
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
55
|
+
|
|
52
56
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
53
57
|
const client = new HanaManagementClient(new DefaultAzureCredential(), subscriptionId);
|
|
58
|
+
|
|
59
|
+
// For client-side applications running in the browser, use this code instead:
|
|
60
|
+
// const credential = new InteractiveBrowserCredential({
|
|
61
|
+
// tenantId: "<YOUR_TENANT_ID>",
|
|
62
|
+
// clientId: "<YOUR_CLIENT_ID>"
|
|
63
|
+
// });
|
|
64
|
+
// const client = new HanaManagementClient(credential, subscriptionId);
|
|
54
65
|
```
|
|
55
66
|
|
|
56
67
|
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var coreClient = require('@azure/core-client');
|
|
6
5
|
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
8
|
var coreLro = require('@azure/core-lro');
|
|
8
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Copyright (c) Microsoft Corporation.
|
|
33
|
+
* Licensed under the MIT License.
|
|
34
|
+
*
|
|
35
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
36
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
37
|
+
*/
|
|
38
|
+
const pageMap = new WeakMap();
|
|
39
|
+
/**
|
|
40
|
+
* Given a result page from a pageable operation, returns a
|
|
41
|
+
* continuation token that can be used to begin paging from
|
|
42
|
+
* that point later.
|
|
43
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
44
|
+
* @returns The continuation token that can be passed into byPage().
|
|
45
|
+
*/
|
|
46
|
+
function getContinuationToken(page) {
|
|
47
|
+
var _a;
|
|
48
|
+
if (typeof page !== "object" || page === null) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
52
|
+
}
|
|
53
|
+
function setContinuationToken(page, continuationToken) {
|
|
54
|
+
var _a;
|
|
55
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
59
|
+
pageInfo.continuationToken = continuationToken;
|
|
60
|
+
pageMap.set(page, pageInfo);
|
|
61
|
+
}
|
|
62
|
+
|
|
9
63
|
/*
|
|
10
64
|
* Copyright (c) Microsoft Corporation.
|
|
11
65
|
* Licensed under the MIT License.
|
|
@@ -13,13 +67,22 @@ var coreLro = require('@azure/core-lro');
|
|
|
13
67
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
14
68
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
15
69
|
*/
|
|
70
|
+
/** Known values of {@link HanaProvisioningStatesEnum} that the service accepts. */
|
|
71
|
+
exports.KnownHanaProvisioningStatesEnum = void 0;
|
|
16
72
|
(function (KnownHanaProvisioningStatesEnum) {
|
|
73
|
+
/** Accepted */
|
|
17
74
|
KnownHanaProvisioningStatesEnum["Accepted"] = "Accepted";
|
|
75
|
+
/** Creating */
|
|
18
76
|
KnownHanaProvisioningStatesEnum["Creating"] = "Creating";
|
|
77
|
+
/** Updating */
|
|
19
78
|
KnownHanaProvisioningStatesEnum["Updating"] = "Updating";
|
|
79
|
+
/** Failed */
|
|
20
80
|
KnownHanaProvisioningStatesEnum["Failed"] = "Failed";
|
|
81
|
+
/** Succeeded */
|
|
21
82
|
KnownHanaProvisioningStatesEnum["Succeeded"] = "Succeeded";
|
|
83
|
+
/** Deleting */
|
|
22
84
|
KnownHanaProvisioningStatesEnum["Deleting"] = "Deleting";
|
|
85
|
+
/** Migrating */
|
|
23
86
|
KnownHanaProvisioningStatesEnum["Migrating"] = "Migrating";
|
|
24
87
|
})(exports.KnownHanaProvisioningStatesEnum || (exports.KnownHanaProvisioningStatesEnum = {}));
|
|
25
88
|
|
|
@@ -515,14 +578,18 @@ class OperationsImpl {
|
|
|
515
578
|
[Symbol.asyncIterator]() {
|
|
516
579
|
return this;
|
|
517
580
|
},
|
|
518
|
-
byPage: () => {
|
|
519
|
-
|
|
581
|
+
byPage: (settings) => {
|
|
582
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
583
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
584
|
+
}
|
|
585
|
+
return this.listPagingPage(options, settings);
|
|
520
586
|
}
|
|
521
587
|
};
|
|
522
588
|
}
|
|
523
|
-
listPagingPage(options) {
|
|
589
|
+
listPagingPage(options, _settings) {
|
|
524
590
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
525
|
-
let result
|
|
591
|
+
let result;
|
|
592
|
+
result = yield tslib.__await(this._list(options));
|
|
526
593
|
yield yield tslib.__await(result.value || []);
|
|
527
594
|
});
|
|
528
595
|
}
|
|
@@ -549,12 +616,12 @@ class OperationsImpl {
|
|
|
549
616
|
* @param options The options parameters.
|
|
550
617
|
*/
|
|
551
618
|
_list(options) {
|
|
552
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
619
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$2);
|
|
553
620
|
}
|
|
554
621
|
}
|
|
555
622
|
// Operation Specifications
|
|
556
|
-
const serializer =
|
|
557
|
-
const listOperationSpec = {
|
|
623
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
624
|
+
const listOperationSpec$2 = {
|
|
558
625
|
path: "/providers/Microsoft.HanaOnAzure/operations",
|
|
559
626
|
httpMethod: "GET",
|
|
560
627
|
responses: {
|
|
@@ -568,7 +635,7 @@ const listOperationSpec = {
|
|
|
568
635
|
queryParameters: [apiVersion],
|
|
569
636
|
urlParameters: [$host],
|
|
570
637
|
headerParameters: [accept],
|
|
571
|
-
serializer
|
|
638
|
+
serializer: serializer$2
|
|
572
639
|
};
|
|
573
640
|
|
|
574
641
|
/*
|
|
@@ -630,20 +697,31 @@ class SapMonitorsImpl {
|
|
|
630
697
|
[Symbol.asyncIterator]() {
|
|
631
698
|
return this;
|
|
632
699
|
},
|
|
633
|
-
byPage: () => {
|
|
634
|
-
|
|
700
|
+
byPage: (settings) => {
|
|
701
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
702
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
703
|
+
}
|
|
704
|
+
return this.listPagingPage(options, settings);
|
|
635
705
|
}
|
|
636
706
|
};
|
|
637
707
|
}
|
|
638
|
-
listPagingPage(options) {
|
|
708
|
+
listPagingPage(options, settings) {
|
|
639
709
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
640
|
-
let result
|
|
641
|
-
|
|
642
|
-
|
|
710
|
+
let result;
|
|
711
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
712
|
+
if (!continuationToken) {
|
|
713
|
+
result = yield tslib.__await(this._list(options));
|
|
714
|
+
let page = result.value || [];
|
|
715
|
+
continuationToken = result.nextLink;
|
|
716
|
+
setContinuationToken(page, continuationToken);
|
|
717
|
+
yield yield tslib.__await(page);
|
|
718
|
+
}
|
|
643
719
|
while (continuationToken) {
|
|
644
720
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
645
721
|
continuationToken = result.nextLink;
|
|
646
|
-
|
|
722
|
+
let page = result.value || [];
|
|
723
|
+
setContinuationToken(page, continuationToken);
|
|
724
|
+
yield yield tslib.__await(page);
|
|
647
725
|
}
|
|
648
726
|
});
|
|
649
727
|
}
|
|
@@ -680,7 +758,7 @@ class SapMonitorsImpl {
|
|
|
680
758
|
* @param options The options parameters.
|
|
681
759
|
*/
|
|
682
760
|
get(resourceGroupName, sapMonitorName, options) {
|
|
683
|
-
return this.client.sendOperationRequest({ resourceGroupName, sapMonitorName, options }, getOperationSpec);
|
|
761
|
+
return this.client.sendOperationRequest({ resourceGroupName, sapMonitorName, options }, getOperationSpec$1);
|
|
684
762
|
}
|
|
685
763
|
/**
|
|
686
764
|
* Creates a SAP monitor for the specified subscription, resource group, and resource name.
|
|
@@ -713,11 +791,13 @@ class SapMonitorsImpl {
|
|
|
713
791
|
}
|
|
714
792
|
};
|
|
715
793
|
});
|
|
716
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, sapMonitorName, sapMonitorParameter, options }, createOperationSpec);
|
|
717
|
-
|
|
794
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, sapMonitorName, sapMonitorParameter, options }, createOperationSpec$1);
|
|
795
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
718
796
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
719
797
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
720
798
|
});
|
|
799
|
+
yield poller.poll();
|
|
800
|
+
return poller;
|
|
721
801
|
});
|
|
722
802
|
}
|
|
723
803
|
/**
|
|
@@ -763,11 +843,13 @@ class SapMonitorsImpl {
|
|
|
763
843
|
}
|
|
764
844
|
};
|
|
765
845
|
});
|
|
766
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, sapMonitorName, options }, deleteOperationSpec);
|
|
767
|
-
|
|
846
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, sapMonitorName, options }, deleteOperationSpec$1);
|
|
847
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
768
848
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
769
849
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
770
850
|
});
|
|
851
|
+
yield poller.poll();
|
|
852
|
+
return poller;
|
|
771
853
|
});
|
|
772
854
|
}
|
|
773
855
|
/**
|
|
@@ -799,11 +881,11 @@ class SapMonitorsImpl {
|
|
|
799
881
|
* @param options The options parameters.
|
|
800
882
|
*/
|
|
801
883
|
_listNext(nextLink, options) {
|
|
802
|
-
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
884
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
|
|
803
885
|
}
|
|
804
886
|
}
|
|
805
887
|
// Operation Specifications
|
|
806
|
-
const serializer$1 =
|
|
888
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
807
889
|
const listOperationSpec$1 = {
|
|
808
890
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/sapMonitors",
|
|
809
891
|
httpMethod: "GET",
|
|
@@ -820,7 +902,7 @@ const listOperationSpec$1 = {
|
|
|
820
902
|
headerParameters: [accept],
|
|
821
903
|
serializer: serializer$1
|
|
822
904
|
};
|
|
823
|
-
const getOperationSpec = {
|
|
905
|
+
const getOperationSpec$1 = {
|
|
824
906
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
825
907
|
httpMethod: "GET",
|
|
826
908
|
responses: {
|
|
@@ -841,7 +923,7 @@ const getOperationSpec = {
|
|
|
841
923
|
headerParameters: [accept],
|
|
842
924
|
serializer: serializer$1
|
|
843
925
|
};
|
|
844
|
-
const createOperationSpec = {
|
|
926
|
+
const createOperationSpec$1 = {
|
|
845
927
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
846
928
|
httpMethod: "PUT",
|
|
847
929
|
responses: {
|
|
@@ -873,7 +955,7 @@ const createOperationSpec = {
|
|
|
873
955
|
mediaType: "json",
|
|
874
956
|
serializer: serializer$1
|
|
875
957
|
};
|
|
876
|
-
const deleteOperationSpec = {
|
|
958
|
+
const deleteOperationSpec$1 = {
|
|
877
959
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
878
960
|
httpMethod: "DELETE",
|
|
879
961
|
responses: {
|
|
@@ -918,7 +1000,7 @@ const updateOperationSpec = {
|
|
|
918
1000
|
mediaType: "json",
|
|
919
1001
|
serializer: serializer$1
|
|
920
1002
|
};
|
|
921
|
-
const listNextOperationSpec = {
|
|
1003
|
+
const listNextOperationSpec$1 = {
|
|
922
1004
|
path: "{nextLink}",
|
|
923
1005
|
httpMethod: "GET",
|
|
924
1006
|
responses: {
|
|
@@ -972,20 +1054,31 @@ class ProviderInstancesImpl {
|
|
|
972
1054
|
[Symbol.asyncIterator]() {
|
|
973
1055
|
return this;
|
|
974
1056
|
},
|
|
975
|
-
byPage: () => {
|
|
976
|
-
|
|
1057
|
+
byPage: (settings) => {
|
|
1058
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1059
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1060
|
+
}
|
|
1061
|
+
return this.listPagingPage(resourceGroupName, sapMonitorName, options, settings);
|
|
977
1062
|
}
|
|
978
1063
|
};
|
|
979
1064
|
}
|
|
980
|
-
listPagingPage(resourceGroupName, sapMonitorName, options) {
|
|
1065
|
+
listPagingPage(resourceGroupName, sapMonitorName, options, settings) {
|
|
981
1066
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
982
|
-
let result
|
|
983
|
-
|
|
984
|
-
|
|
1067
|
+
let result;
|
|
1068
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1069
|
+
if (!continuationToken) {
|
|
1070
|
+
result = yield tslib.__await(this._list(resourceGroupName, sapMonitorName, options));
|
|
1071
|
+
let page = result.value || [];
|
|
1072
|
+
continuationToken = result.nextLink;
|
|
1073
|
+
setContinuationToken(page, continuationToken);
|
|
1074
|
+
yield yield tslib.__await(page);
|
|
1075
|
+
}
|
|
985
1076
|
while (continuationToken) {
|
|
986
1077
|
result = yield tslib.__await(this._listNext(resourceGroupName, sapMonitorName, continuationToken, options));
|
|
987
1078
|
continuationToken = result.nextLink;
|
|
988
|
-
|
|
1079
|
+
let page = result.value || [];
|
|
1080
|
+
setContinuationToken(page, continuationToken);
|
|
1081
|
+
yield yield tslib.__await(page);
|
|
989
1082
|
}
|
|
990
1083
|
});
|
|
991
1084
|
}
|
|
@@ -1015,7 +1108,7 @@ class ProviderInstancesImpl {
|
|
|
1015
1108
|
* @param options The options parameters.
|
|
1016
1109
|
*/
|
|
1017
1110
|
_list(resourceGroupName, sapMonitorName, options) {
|
|
1018
|
-
return this.client.sendOperationRequest({ resourceGroupName, sapMonitorName, options }, listOperationSpec
|
|
1111
|
+
return this.client.sendOperationRequest({ resourceGroupName, sapMonitorName, options }, listOperationSpec);
|
|
1019
1112
|
}
|
|
1020
1113
|
/**
|
|
1021
1114
|
* Gets properties of a provider instance for the specified subscription, resource group, SapMonitor
|
|
@@ -1026,7 +1119,7 @@ class ProviderInstancesImpl {
|
|
|
1026
1119
|
* @param options The options parameters.
|
|
1027
1120
|
*/
|
|
1028
1121
|
get(resourceGroupName, sapMonitorName, providerInstanceName, options) {
|
|
1029
|
-
return this.client.sendOperationRequest({ resourceGroupName, sapMonitorName, providerInstanceName, options }, getOperationSpec
|
|
1122
|
+
return this.client.sendOperationRequest({ resourceGroupName, sapMonitorName, providerInstanceName, options }, getOperationSpec);
|
|
1030
1123
|
}
|
|
1031
1124
|
/**
|
|
1032
1125
|
* Creates a provider instance for the specified subscription, resource group, SapMonitor name, and
|
|
@@ -1067,11 +1160,13 @@ class ProviderInstancesImpl {
|
|
|
1067
1160
|
providerInstanceName,
|
|
1068
1161
|
providerInstanceParameter,
|
|
1069
1162
|
options
|
|
1070
|
-
}, createOperationSpec
|
|
1071
|
-
|
|
1163
|
+
}, createOperationSpec);
|
|
1164
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1072
1165
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1073
1166
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1074
1167
|
});
|
|
1168
|
+
yield poller.poll();
|
|
1169
|
+
return poller;
|
|
1075
1170
|
});
|
|
1076
1171
|
}
|
|
1077
1172
|
/**
|
|
@@ -1121,11 +1216,13 @@ class ProviderInstancesImpl {
|
|
|
1121
1216
|
}
|
|
1122
1217
|
};
|
|
1123
1218
|
});
|
|
1124
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, sapMonitorName, providerInstanceName, options }, deleteOperationSpec
|
|
1125
|
-
|
|
1219
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, sapMonitorName, providerInstanceName, options }, deleteOperationSpec);
|
|
1220
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1126
1221
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1127
1222
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1128
1223
|
});
|
|
1224
|
+
yield poller.poll();
|
|
1225
|
+
return poller;
|
|
1129
1226
|
});
|
|
1130
1227
|
}
|
|
1131
1228
|
/**
|
|
@@ -1150,12 +1247,12 @@ class ProviderInstancesImpl {
|
|
|
1150
1247
|
* @param options The options parameters.
|
|
1151
1248
|
*/
|
|
1152
1249
|
_listNext(resourceGroupName, sapMonitorName, nextLink, options) {
|
|
1153
|
-
return this.client.sendOperationRequest({ resourceGroupName, sapMonitorName, nextLink, options }, listNextOperationSpec
|
|
1250
|
+
return this.client.sendOperationRequest({ resourceGroupName, sapMonitorName, nextLink, options }, listNextOperationSpec);
|
|
1154
1251
|
}
|
|
1155
1252
|
}
|
|
1156
1253
|
// Operation Specifications
|
|
1157
|
-
const serializer
|
|
1158
|
-
const listOperationSpec
|
|
1254
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1255
|
+
const listOperationSpec = {
|
|
1159
1256
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances",
|
|
1160
1257
|
httpMethod: "GET",
|
|
1161
1258
|
responses: {
|
|
@@ -1174,9 +1271,9 @@ const listOperationSpec$2 = {
|
|
|
1174
1271
|
sapMonitorName
|
|
1175
1272
|
],
|
|
1176
1273
|
headerParameters: [accept],
|
|
1177
|
-
serializer
|
|
1274
|
+
serializer
|
|
1178
1275
|
};
|
|
1179
|
-
const getOperationSpec
|
|
1276
|
+
const getOperationSpec = {
|
|
1180
1277
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}",
|
|
1181
1278
|
httpMethod: "GET",
|
|
1182
1279
|
responses: {
|
|
@@ -1196,9 +1293,9 @@ const getOperationSpec$1 = {
|
|
|
1196
1293
|
providerInstanceName
|
|
1197
1294
|
],
|
|
1198
1295
|
headerParameters: [accept],
|
|
1199
|
-
serializer
|
|
1296
|
+
serializer
|
|
1200
1297
|
};
|
|
1201
|
-
const createOperationSpec
|
|
1298
|
+
const createOperationSpec = {
|
|
1202
1299
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}",
|
|
1203
1300
|
httpMethod: "PUT",
|
|
1204
1301
|
responses: {
|
|
@@ -1229,9 +1326,9 @@ const createOperationSpec$1 = {
|
|
|
1229
1326
|
],
|
|
1230
1327
|
headerParameters: [accept, contentType],
|
|
1231
1328
|
mediaType: "json",
|
|
1232
|
-
serializer
|
|
1329
|
+
serializer
|
|
1233
1330
|
};
|
|
1234
|
-
const deleteOperationSpec
|
|
1331
|
+
const deleteOperationSpec = {
|
|
1235
1332
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}",
|
|
1236
1333
|
httpMethod: "DELETE",
|
|
1237
1334
|
responses: {
|
|
@@ -1252,9 +1349,9 @@ const deleteOperationSpec$1 = {
|
|
|
1252
1349
|
providerInstanceName
|
|
1253
1350
|
],
|
|
1254
1351
|
headerParameters: [accept],
|
|
1255
|
-
serializer
|
|
1352
|
+
serializer
|
|
1256
1353
|
};
|
|
1257
|
-
const listNextOperationSpec
|
|
1354
|
+
const listNextOperationSpec = {
|
|
1258
1355
|
path: "{nextLink}",
|
|
1259
1356
|
httpMethod: "GET",
|
|
1260
1357
|
responses: {
|
|
@@ -1274,7 +1371,7 @@ const listNextOperationSpec$1 = {
|
|
|
1274
1371
|
nextLink
|
|
1275
1372
|
],
|
|
1276
1373
|
headerParameters: [accept],
|
|
1277
|
-
serializer
|
|
1374
|
+
serializer
|
|
1278
1375
|
};
|
|
1279
1376
|
|
|
1280
1377
|
/*
|
|
@@ -1284,7 +1381,7 @@ const listNextOperationSpec$1 = {
|
|
|
1284
1381
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1285
1382
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1286
1383
|
*/
|
|
1287
|
-
class HanaManagementClient extends
|
|
1384
|
+
class HanaManagementClient extends coreClient__namespace.ServiceClient {
|
|
1288
1385
|
/**
|
|
1289
1386
|
* Initializes a new instance of the HanaManagementClient class.
|
|
1290
1387
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -1293,6 +1390,7 @@ class HanaManagementClient extends coreClient.ServiceClient {
|
|
|
1293
1390
|
* @param options The parameter options
|
|
1294
1391
|
*/
|
|
1295
1392
|
constructor(credentials, subscriptionId, options) {
|
|
1393
|
+
var _a, _b, _c;
|
|
1296
1394
|
if (credentials === undefined) {
|
|
1297
1395
|
throw new Error("'credentials' cannot be null");
|
|
1298
1396
|
}
|
|
@@ -1307,17 +1405,35 @@ class HanaManagementClient extends coreClient.ServiceClient {
|
|
|
1307
1405
|
requestContentType: "application/json; charset=utf-8",
|
|
1308
1406
|
credential: credentials
|
|
1309
1407
|
};
|
|
1310
|
-
const packageDetails = `azsdk-js-arm-hanaonazure/4.0.0-beta.
|
|
1408
|
+
const packageDetails = `azsdk-js-arm-hanaonazure/4.0.0-beta.3`;
|
|
1311
1409
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1312
1410
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1313
1411
|
: `${packageDetails}`;
|
|
1314
|
-
if (!options.credentialScopes) {
|
|
1315
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
1316
|
-
}
|
|
1317
1412
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1318
1413
|
userAgentPrefix
|
|
1319
|
-
},
|
|
1414
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1320
1415
|
super(optionsWithDefaults);
|
|
1416
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
1417
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1418
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1419
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1420
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1421
|
+
}
|
|
1422
|
+
if (!options ||
|
|
1423
|
+
!options.pipeline ||
|
|
1424
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
1425
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
1426
|
+
this.pipeline.removePolicy({
|
|
1427
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1428
|
+
});
|
|
1429
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1430
|
+
credential: credentials,
|
|
1431
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
1432
|
+
challengeCallbacks: {
|
|
1433
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1434
|
+
}
|
|
1435
|
+
}));
|
|
1436
|
+
}
|
|
1321
1437
|
// Parameter assignments
|
|
1322
1438
|
this.subscriptionId = subscriptionId;
|
|
1323
1439
|
// Assigning values to Constant parameters
|
|
@@ -1326,8 +1442,37 @@ class HanaManagementClient extends coreClient.ServiceClient {
|
|
|
1326
1442
|
this.operations = new OperationsImpl(this);
|
|
1327
1443
|
this.sapMonitors = new SapMonitorsImpl(this);
|
|
1328
1444
|
this.providerInstances = new ProviderInstancesImpl(this);
|
|
1445
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
1446
|
+
}
|
|
1447
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
1448
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
1449
|
+
if (!apiVersion) {
|
|
1450
|
+
return;
|
|
1451
|
+
}
|
|
1452
|
+
const apiVersionPolicy = {
|
|
1453
|
+
name: "CustomApiVersionPolicy",
|
|
1454
|
+
sendRequest(request, next) {
|
|
1455
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1456
|
+
const param = request.url.split("?");
|
|
1457
|
+
if (param.length > 1) {
|
|
1458
|
+
const newParams = param[1].split("&").map((item) => {
|
|
1459
|
+
if (item.indexOf("api-version") > -1) {
|
|
1460
|
+
return "api-version=" + apiVersion;
|
|
1461
|
+
}
|
|
1462
|
+
else {
|
|
1463
|
+
return item;
|
|
1464
|
+
}
|
|
1465
|
+
});
|
|
1466
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
1467
|
+
}
|
|
1468
|
+
return next(request);
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1472
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
1329
1473
|
}
|
|
1330
1474
|
}
|
|
1331
1475
|
|
|
1332
1476
|
exports.HanaManagementClient = HanaManagementClient;
|
|
1477
|
+
exports.getContinuationToken = getContinuationToken;
|
|
1333
1478
|
//# sourceMappingURL=index.js.map
|