@azure/arm-advisor 3.0.1-alpha.20220208.1 → 3.0.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 +3 -7
- package/LICENSE +1 -1
- package/README.md +11 -0
- package/dist/index.js +78 -43
- 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/configurationsCreateInResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.js +51 -0
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.js +50 -0
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/recommendationMetadataGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/recommendationMetadataGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/recommendationMetadataGetSample.js +30 -0
- package/dist-esm/samples-dev/recommendationMetadataGetSample.js.map +1 -0
- package/dist-esm/samples-dev/recommendationMetadataListSample.d.ts +2 -0
- package/dist-esm/samples-dev/recommendationMetadataListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/recommendationMetadataListSample.js +43 -0
- package/dist-esm/samples-dev/recommendationMetadataListSample.js.map +1 -0
- package/dist-esm/samples-dev/recommendationsGenerateSample.d.ts +2 -0
- package/dist-esm/samples-dev/recommendationsGenerateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/recommendationsGenerateSample.js +29 -0
- package/dist-esm/samples-dev/recommendationsGenerateSample.js.map +1 -0
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.d.ts +2 -0
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.js +30 -0
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.js.map +1 -0
- package/dist-esm/samples-dev/recommendationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/recommendationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/recommendationsGetSample.js +31 -0
- package/dist-esm/samples-dev/recommendationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/recommendationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/recommendationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/recommendationsListSample.js +45 -0
- package/dist-esm/samples-dev/recommendationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/suppressionsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/suppressionsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/suppressionsCreateSample.js +33 -0
- package/dist-esm/samples-dev/suppressionsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/suppressionsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/suppressionsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/suppressionsDeleteSample.js +32 -0
- package/dist-esm/samples-dev/suppressionsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/suppressionsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/suppressionsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/suppressionsGetSample.js +32 -0
- package/dist-esm/samples-dev/suppressionsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/suppressionsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/suppressionsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/suppressionsListSample.js +43 -0
- package/dist-esm/samples-dev/suppressionsListSample.js.map +1 -0
- package/dist-esm/src/advisorManagementClient.d.ts.map +1 -1
- package/dist-esm/src/advisorManagementClient.js +3 -2
- package/dist-esm/src/advisorManagementClient.js.map +1 -1
- package/dist-esm/test/sampleTest.d.ts +1 -3
- package/dist-esm/test/sampleTest.d.ts.map +1 -1
- package/dist-esm/test/sampleTest.js +1 -4
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +24 -8
- package/rollup.config.js +6 -72
- package/src/advisorManagementClient.ts +3 -2
- package/tsconfig.json +19 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationsGenerateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/recommendationsGenerateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { AdvisorManagementClient } from "@azure/arm-advisor";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service.
|
|
15
|
+
*
|
|
16
|
+
* @summary Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service.
|
|
17
|
+
* x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GenerateRecommendations.json
|
|
18
|
+
*/
|
|
19
|
+
function generateRecommendations() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "subscriptionId";
|
|
22
|
+
const credential = new DefaultAzureCredential();
|
|
23
|
+
const client = new AdvisorManagementClient(credential, subscriptionId);
|
|
24
|
+
const result = yield client.recommendations.generate();
|
|
25
|
+
console.log(result);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
generateRecommendations().catch(console.error);
|
|
29
|
+
//# sourceMappingURL=recommendationsGenerateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationsGenerateSample.js","sourceRoot":"","sources":["../../samples-dev/recommendationsGenerateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,uBAAuB;;QACpC,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,uBAAuB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationsGetGenerateStatusSample.d.ts","sourceRoot":"","sources":["../../samples-dev/recommendationsGetGenerateStatusSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { AdvisorManagementClient } from "@azure/arm-advisor";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header.
|
|
15
|
+
*
|
|
16
|
+
* @summary Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header.
|
|
17
|
+
* x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/EmptyResponse.json
|
|
18
|
+
*/
|
|
19
|
+
function getGenerateStatus() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "subscriptionId";
|
|
22
|
+
const operationId = "operationGUID";
|
|
23
|
+
const credential = new DefaultAzureCredential();
|
|
24
|
+
const client = new AdvisorManagementClient(credential, subscriptionId);
|
|
25
|
+
const result = yield client.recommendations.getGenerateStatus(operationId);
|
|
26
|
+
console.log(result);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
getGenerateStatus().catch(console.error);
|
|
30
|
+
//# sourceMappingURL=recommendationsGetGenerateStatusSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationsGetGenerateStatusSample.js","sourceRoot":"","sources":["../../samples-dev/recommendationsGetGenerateStatusSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,WAAW,GAAG,eAAe,CAAC;QACpC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationsGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/recommendationsGetSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { AdvisorManagementClient } from "@azure/arm-advisor";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Obtains details of a cached recommendation.
|
|
15
|
+
*
|
|
16
|
+
* @summary Obtains details of a cached recommendation.
|
|
17
|
+
* x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GetRecommendationDetail.json
|
|
18
|
+
*/
|
|
19
|
+
function getRecommendationDetail() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
22
|
+
const resourceUri = "resourceUri";
|
|
23
|
+
const recommendationId = "recommendationId";
|
|
24
|
+
const credential = new DefaultAzureCredential();
|
|
25
|
+
const client = new AdvisorManagementClient(credential, subscriptionId);
|
|
26
|
+
const result = yield client.recommendations.get(resourceUri, recommendationId);
|
|
27
|
+
console.log(result);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
getRecommendationDetail().catch(console.error);
|
|
31
|
+
//# sourceMappingURL=recommendationsGetSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationsGetSample.js","sourceRoot":"","sources":["../../samples-dev/recommendationsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,uBAAuB;;QACpC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;QAC5C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,GAAG,CAC7C,WAAW,EACX,gBAAgB,CACjB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,uBAAuB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationsListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/recommendationsListSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { AdvisorManagementClient } from "@azure/arm-advisor";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
|
|
15
|
+
*
|
|
16
|
+
* @summary Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
|
|
17
|
+
* x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListRecommendations.json
|
|
18
|
+
*/
|
|
19
|
+
function listRecommendations() {
|
|
20
|
+
var e_1, _a;
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const subscriptionId = "subscriptionId";
|
|
23
|
+
const top = 10;
|
|
24
|
+
const options = { top };
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new AdvisorManagementClient(credential, subscriptionId);
|
|
27
|
+
const resArray = new Array();
|
|
28
|
+
try {
|
|
29
|
+
for (var _b = __asyncValues(client.recommendations.list(options)), _c; _c = yield _b.next(), !_c.done;) {
|
|
30
|
+
let item = _c.value;
|
|
31
|
+
resArray.push(item);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
35
|
+
finally {
|
|
36
|
+
try {
|
|
37
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
38
|
+
}
|
|
39
|
+
finally { if (e_1) throw e_1.error; }
|
|
40
|
+
}
|
|
41
|
+
console.log(resArray);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
listRecommendations().catch(console.error);
|
|
45
|
+
//# sourceMappingURL=recommendationsListSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendationsListSample.js","sourceRoot":"","sources":["../../samples-dev/recommendationsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,mBAAmB;;;QAChC,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,GAAG,GAAG,EAAE,CAAC;QACf,MAAM,OAAO,GAAsC,EAAE,GAAG,EAAE,CAAC;QAC3D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA,IAAA;gBAAhD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,mBAAmB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressionsCreateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/suppressionsCreateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { AdvisorManagementClient } from "@azure/arm-advisor";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.
|
|
15
|
+
*
|
|
16
|
+
* @summary Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.
|
|
17
|
+
* x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateSuppression.json
|
|
18
|
+
*/
|
|
19
|
+
function createSuppression() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
22
|
+
const resourceUri = "resourceUri";
|
|
23
|
+
const recommendationId = "recommendationId";
|
|
24
|
+
const name = "suppressionName1";
|
|
25
|
+
const suppressionContract = { ttl: "07:00:00:00" };
|
|
26
|
+
const credential = new DefaultAzureCredential();
|
|
27
|
+
const client = new AdvisorManagementClient(credential, subscriptionId);
|
|
28
|
+
const result = yield client.suppressions.create(resourceUri, recommendationId, name, suppressionContract);
|
|
29
|
+
console.log(result);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
createSuppression().catch(console.error);
|
|
33
|
+
//# sourceMappingURL=suppressionsCreateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressionsCreateSample.js","sourceRoot":"","sources":["../../samples-dev/suppressionsCreateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;QAC5C,MAAM,IAAI,GAAG,kBAAkB,CAAC;QAChC,MAAM,mBAAmB,GAAwB,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC;QACxE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,CAC7C,WAAW,EACX,gBAAgB,EAChB,IAAI,EACJ,mBAAmB,CACpB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressionsDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/suppressionsDeleteSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { AdvisorManagementClient } from "@azure/arm-advisor";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.
|
|
15
|
+
*
|
|
16
|
+
* @summary Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.
|
|
17
|
+
* x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/DeleteSuppression.json
|
|
18
|
+
*/
|
|
19
|
+
function deleteSuppression() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
22
|
+
const resourceUri = "resourceUri";
|
|
23
|
+
const recommendationId = "recommendationId";
|
|
24
|
+
const name = "suppressionName1";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new AdvisorManagementClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.suppressions.delete(resourceUri, recommendationId, name);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
deleteSuppression().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=suppressionsDeleteSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressionsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/suppressionsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;QAC5C,MAAM,IAAI,GAAG,kBAAkB,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,CAC7C,WAAW,EACX,gBAAgB,EAChB,IAAI,CACL,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressionsGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/suppressionsGetSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { AdvisorManagementClient } from "@azure/arm-advisor";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Obtains the details of a suppression.
|
|
15
|
+
*
|
|
16
|
+
* @summary Obtains the details of a suppression.
|
|
17
|
+
* x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GetSuppressionDetail.json
|
|
18
|
+
*/
|
|
19
|
+
function getSuppressionDetail() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
22
|
+
const resourceUri = "resourceUri";
|
|
23
|
+
const recommendationId = "recommendationId";
|
|
24
|
+
const name = "suppressionName1";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new AdvisorManagementClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.suppressions.get(resourceUri, recommendationId, name);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
getSuppressionDetail().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=suppressionsGetSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressionsGetSample.js","sourceRoot":"","sources":["../../samples-dev/suppressionsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;QAC5C,MAAM,IAAI,GAAG,kBAAkB,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,GAAG,CAC1C,WAAW,EACX,gBAAgB,EAChB,IAAI,CACL,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oBAAoB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressionsListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/suppressionsListSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { AdvisorManagementClient } from "@azure/arm-advisor";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.
|
|
15
|
+
*
|
|
16
|
+
* @summary Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.
|
|
17
|
+
* x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListSuppressions.json
|
|
18
|
+
*/
|
|
19
|
+
function listSuppressions() {
|
|
20
|
+
var e_1, _a;
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const subscriptionId = "subscriptionId1";
|
|
23
|
+
const credential = new DefaultAzureCredential();
|
|
24
|
+
const client = new AdvisorManagementClient(credential, subscriptionId);
|
|
25
|
+
const resArray = new Array();
|
|
26
|
+
try {
|
|
27
|
+
for (var _b = __asyncValues(client.suppressions.list()), _c; _c = yield _b.next(), !_c.done;) {
|
|
28
|
+
let item = _c.value;
|
|
29
|
+
resArray.push(item);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
33
|
+
finally {
|
|
34
|
+
try {
|
|
35
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
36
|
+
}
|
|
37
|
+
finally { if (e_1) throw e_1.error; }
|
|
38
|
+
}
|
|
39
|
+
console.log(resArray);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
listSuppressions().catch(console.error);
|
|
43
|
+
//# sourceMappingURL=suppressionsListSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressionsListSample.js","sourceRoot":"","sources":["../../samples-dev/suppressionsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gBAAgB;;;QAC7B,MAAM,cAAc,GAAG,iBAAiB,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA,IAAA;gBAAtC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,gBAAgB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advisorManagementClient.d.ts","sourceRoot":"","sources":["../../src/advisorManagementClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAQ7C,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,UAAU,EACV,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAEjE,qBAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,qCAAqC;
|
|
1
|
+
{"version":3,"file":"advisorManagementClient.d.ts","sourceRoot":"","sources":["../../src/advisorManagementClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAQ7C,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,UAAU,EACV,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAEjE,qBAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,qCAAqC;IAkDjD,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;CAC5B"}
|
|
@@ -15,6 +15,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
|
15
15
|
* @param options The parameter options
|
|
16
16
|
*/
|
|
17
17
|
constructor(credentials, subscriptionId, options) {
|
|
18
|
+
var _a, _b;
|
|
18
19
|
if (credentials === undefined) {
|
|
19
20
|
throw new Error("'credentials' cannot be null");
|
|
20
21
|
}
|
|
@@ -29,7 +30,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
|
29
30
|
requestContentType: "application/json; charset=utf-8",
|
|
30
31
|
credential: credentials
|
|
31
32
|
};
|
|
32
|
-
const packageDetails = `azsdk-js-arm-advisor/3.0.
|
|
33
|
+
const packageDetails = `azsdk-js-arm-advisor/3.0.1`;
|
|
33
34
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
34
35
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
35
36
|
: `${packageDetails}`;
|
|
@@ -38,7 +39,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
|
38
39
|
}
|
|
39
40
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
40
41
|
userAgentPrefix
|
|
41
|
-
}, baseUri: options.endpoint
|
|
42
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
42
43
|
super(optionsWithDefaults);
|
|
43
44
|
// Parameter assignments
|
|
44
45
|
this.subscriptionId = subscriptionId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advisorManagementClient.js","sourceRoot":"","sources":["../../src/advisorManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAUtB,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAKnE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA+C
|
|
1
|
+
{"version":3,"file":"advisorManagementClient.js","sourceRoot":"","sources":["../../src/advisorManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAUtB,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAKnE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA+C;;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAA0C;YACtD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,4BAA4B,CAAC;QACpD,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,OAAO,CAAC,gBAAgB,GAAG,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EACL,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,GACxE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,0CAA0C;QAC1C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,8BAA8B,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;QACrD,IAAI,CAAC,sBAAsB,GAAG,IAAI,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,cAAc,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;CAOF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleTest.d.ts","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sampleTest.d.ts","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":""}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
import { __awaiter } from "tslib";
|
|
9
|
-
import { record
|
|
9
|
+
import { record } from "@azure-tools/test-recorder";
|
|
10
10
|
const recorderEnvSetup = {
|
|
11
11
|
replaceableVariables: {
|
|
12
12
|
AZURE_CLIENT_ID: "azure_client_id",
|
|
@@ -19,9 +19,6 @@ const recorderEnvSetup = {
|
|
|
19
19
|
],
|
|
20
20
|
queryParametersToSkip: []
|
|
21
21
|
};
|
|
22
|
-
export const testPollingOptions = {
|
|
23
|
-
updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
|
|
24
|
-
};
|
|
25
22
|
describe("My test", () => {
|
|
26
23
|
let recorder;
|
|
27
24
|
beforeEach(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAEL,MAAM,
|
|
1
|
+
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAEL,MAAM,EAGP,MAAM,4BAA4B,CAAC;AAGpC,MAAM,gBAAgB,GAA6B;IACjD,oBAAoB,EAAE;QACpB,eAAe,EAAE,iBAAiB;QAClC,mBAAmB,EAAE,qBAAqB;QAC1C,eAAe,EAAE,sCAAsC;QACvD,eAAe,EAAE,uBAAuB;KACzC;IACD,0BAA0B,EAAE;QAC1B,CAAC,SAAc,EAAO,EAAE,CACtB,SAAS,CAAC,OAAO,CACf,yBAAyB,EACzB,+BAA+B,CAChC;KACJ;IACD,qBAAqB,EAAE,EAAE;CAC1B,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAC5C,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for AdvisorManagementClient.",
|
|
6
|
-
"version": "3.0.1
|
|
6
|
+
"version": "3.0.1",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=12.0.0"
|
|
9
9
|
},
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"types": "./types/arm-advisor.d.ts",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@microsoft/api-extractor": "^7.18.11",
|
|
30
|
-
"@rollup/plugin-commonjs": "
|
|
31
|
-
"@rollup/plugin-json": "^4.
|
|
32
|
-
"@rollup/plugin-multi-entry": "^
|
|
33
|
-
"@rollup/plugin-node-resolve": "^
|
|
30
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
31
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
32
|
+
"@rollup/plugin-multi-entry": "^4.1.0",
|
|
33
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
34
34
|
"mkdirp": "^1.0.4",
|
|
35
|
-
"rollup": "^
|
|
36
|
-
"rollup-plugin-sourcemaps": "^0.
|
|
35
|
+
"rollup": "^2.66.1",
|
|
36
|
+
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
37
37
|
"typescript": "~4.2.0",
|
|
38
38
|
"uglify-js": "^3.4.9",
|
|
39
39
|
"rimraf": "^3.0.0",
|
|
@@ -96,5 +96,21 @@
|
|
|
96
96
|
"docs": "echo skipped"
|
|
97
97
|
},
|
|
98
98
|
"sideEffects": false,
|
|
99
|
-
"
|
|
99
|
+
"//metadata": {
|
|
100
|
+
"constantPaths": [
|
|
101
|
+
{
|
|
102
|
+
"path": "src/advisorManagementClient.ts",
|
|
103
|
+
"prefix": "packageDetails"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"autoPublish": true,
|
|
108
|
+
"//sampleConfiguration": {
|
|
109
|
+
"productName": "",
|
|
110
|
+
"productSlugs": [
|
|
111
|
+
"azure"
|
|
112
|
+
],
|
|
113
|
+
"disableDocsMs": true,
|
|
114
|
+
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-advisor?view=azure-node-preview"
|
|
115
|
+
}
|
|
100
116
|
}
|
package/rollup.config.js
CHANGED
|
@@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|
|
14
14
|
|
|
15
15
|
import nodeBuiltins from "builtin-modules";
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
|
19
|
-
*
|
|
20
|
-
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
|
21
|
-
* __exportStar downleveled helper function to declare its exports which confuses
|
|
22
|
-
* rollup's automatic discovery mechanism.
|
|
23
|
-
*
|
|
24
|
-
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
|
25
|
-
*/
|
|
26
|
-
export function openTelemetryCommonJs() {
|
|
27
|
-
const namedExports = {};
|
|
28
|
-
|
|
29
|
-
for (const key of [
|
|
30
|
-
"@opentelemetry/api",
|
|
31
|
-
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
|
32
|
-
]) {
|
|
33
|
-
namedExports[key] = [
|
|
34
|
-
"SpanKind",
|
|
35
|
-
"TraceFlags",
|
|
36
|
-
"getSpan",
|
|
37
|
-
"setSpan",
|
|
38
|
-
"SpanStatusCode",
|
|
39
|
-
"getSpanContext",
|
|
40
|
-
"setSpanContext"
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
|
45
|
-
|
|
46
|
-
for (const version of releasedOpenTelemetryVersions) {
|
|
47
|
-
namedExports[
|
|
48
|
-
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
|
49
|
-
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
|
50
|
-
] = [
|
|
51
|
-
"SpanKind",
|
|
52
|
-
"TraceFlags",
|
|
53
|
-
"getSpan",
|
|
54
|
-
"setSpan",
|
|
55
|
-
"StatusCode",
|
|
56
|
-
"CanonicalCode",
|
|
57
|
-
"getSpanContext",
|
|
58
|
-
"setSpanContext"
|
|
59
|
-
];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return namedExports;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
17
|
// #region Warning Handler
|
|
66
18
|
|
|
67
19
|
/**
|
|
68
|
-
* A function that can determine whether a
|
|
20
|
+
* A function that can determine whether a rollup warning should be ignored. If
|
|
69
21
|
* the function returns `true`, then the warning will not be displayed.
|
|
70
22
|
*/
|
|
71
23
|
|
|
72
|
-
function
|
|
24
|
+
function ignoreNiseSinonEval(warning) {
|
|
73
25
|
return (
|
|
74
26
|
warning.code === "EVAL" &&
|
|
75
27
|
warning.id &&
|
|
@@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|
|
78
30
|
);
|
|
79
31
|
}
|
|
80
32
|
|
|
81
|
-
function
|
|
33
|
+
function ignoreChaiCircularDependency(warning) {
|
|
82
34
|
return (
|
|
83
35
|
warning.code === "CIRCULAR_DEPENDENCY" &&
|
|
84
36
|
warning.importer && warning.importer.includes("node_modules/chai") === true
|
|
85
37
|
);
|
|
86
38
|
}
|
|
87
39
|
|
|
88
|
-
const warningInhibitors = [
|
|
89
|
-
ignoreChaiCircularDependencyWarnings,
|
|
90
|
-
ignoreNiseSinonEvalWarnings
|
|
91
|
-
];
|
|
40
|
+
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
|
92
41
|
|
|
93
42
|
/**
|
|
94
43
|
* Construct a warning handler for the shared rollup configuration
|
|
@@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|
|
122
71
|
nodeResolve({
|
|
123
72
|
mainFields: ["module", "browser"]
|
|
124
73
|
}),
|
|
125
|
-
cjs(
|
|
126
|
-
namedExports: {
|
|
127
|
-
// Chai's strange internal architecture makes it impossible to statically
|
|
128
|
-
// analyze its exports.
|
|
129
|
-
chai: [
|
|
130
|
-
"version",
|
|
131
|
-
"use",
|
|
132
|
-
"util",
|
|
133
|
-
"config",
|
|
134
|
-
"expect",
|
|
135
|
-
"should",
|
|
136
|
-
"assert"
|
|
137
|
-
],
|
|
138
|
-
...openTelemetryCommonJs()
|
|
139
|
-
}
|
|
140
|
-
}),
|
|
74
|
+
cjs(),
|
|
141
75
|
json(),
|
|
142
76
|
sourcemaps()
|
|
143
77
|
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
|
@@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|
|
173
107
|
],
|
|
174
108
|
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
|
175
109
|
preserveSymlinks: false,
|
|
176
|
-
plugins: [sourcemaps(), nodeResolve()
|
|
110
|
+
plugins: [sourcemaps(), nodeResolve()]
|
|
177
111
|
};
|
|
178
112
|
|
|
179
113
|
const config = [baseConfig];
|