@azure/arm-advisor 3.1.1-alpha.20230725.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -15
- package/LICENSE +1 -1
- package/dist/index.js +12 -28
- 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.js +9 -2
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.js +9 -2
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.js +9 -2
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.js +9 -2
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/recommendationMetadataGetSample.js +9 -3
- package/dist-esm/samples-dev/recommendationMetadataGetSample.js.map +1 -1
- package/dist-esm/samples-dev/recommendationMetadataListSample.js +9 -3
- package/dist-esm/samples-dev/recommendationMetadataListSample.js.map +1 -1
- package/dist-esm/samples-dev/recommendationsGenerateSample.js +9 -2
- package/dist-esm/samples-dev/recommendationsGenerateSample.js.map +1 -1
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.js +9 -2
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.js.map +1 -1
- package/dist-esm/samples-dev/recommendationsGetSample.js +9 -3
- package/dist-esm/samples-dev/recommendationsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/recommendationsListSample.js +9 -2
- package/dist-esm/samples-dev/recommendationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/suppressionsCreateSample.js +9 -3
- package/dist-esm/samples-dev/suppressionsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/suppressionsDeleteSample.js +9 -3
- package/dist-esm/samples-dev/suppressionsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/suppressionsGetSample.js +9 -3
- package/dist-esm/samples-dev/suppressionsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/suppressionsListSample.js +9 -2
- package/dist-esm/samples-dev/suppressionsListSample.js.map +1 -1
- package/dist-esm/src/advisorManagementClient.d.ts +2 -1
- package/dist-esm/src/advisorManagementClient.d.ts.map +1 -1
- package/dist-esm/src/advisorManagementClient.js +8 -10
- package/dist-esm/src/advisorManagementClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +0 -10
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/configurations.js +0 -1
- package/dist-esm/src/operations/configurations.js.map +1 -1
- package/dist-esm/src/operations/operations.js +0 -1
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/recommendationMetadata.js +0 -1
- package/dist-esm/src/operations/recommendationMetadata.js.map +1 -1
- package/dist-esm/src/operations/recommendations.js +0 -6
- package/dist-esm/src/operations/recommendations.js.map +1 -1
- package/dist-esm/src/operations/suppressions.js +0 -5
- package/dist-esm/src/operations/suppressions.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +4 -4
- package/dist-esm/src/pagingHelper.js +4 -4
- package/dist-esm/test/advisor_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/advisor_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/advisor_operations_test.spec.js +78 -0
- package/dist-esm/test/advisor_operations_test.spec.js.map +1 -0
- package/package.json +6 -5
- package/review/arm-advisor.api.md +2 -6
- package/src/advisorManagementClient.ts +18 -4
- package/src/models/index.ts +2 -14
- package/src/operations/configurations.ts +0 -1
- package/src/operations/operations.ts +0 -1
- package/src/operations/recommendationMetadata.ts +0 -1
- package/src/operations/recommendations.ts +0 -6
- package/src/operations/suppressions.ts +0 -5
- package/src/pagingHelper.ts +4 -4
- package/types/arm-advisor.d.ts +6 -15
- 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
|
@@ -2,11 +2,11 @@ export interface PageInfo {
|
|
|
2
2
|
continuationToken?: string;
|
|
3
3
|
}
|
|
4
4
|
/**
|
|
5
|
-
* Given
|
|
6
|
-
* continuation token that can be used to begin paging from
|
|
5
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
6
|
+
* returns a continuation token that can be used to begin paging from
|
|
7
7
|
* that point later.
|
|
8
|
-
* @param page
|
|
9
|
-
* @returns The continuation token that can be passed into byPage().
|
|
8
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
9
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
10
10
|
*/
|
|
11
11
|
export declare function getContinuationToken(page: unknown): string | undefined;
|
|
12
12
|
export declare function setContinuationToken(page: unknown, continuationToken: string | undefined): void;
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
const pageMap = new WeakMap();
|
|
9
9
|
/**
|
|
10
|
-
* Given
|
|
11
|
-
* continuation token that can be used to begin paging from
|
|
10
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
11
|
+
* returns a continuation token that can be used to begin paging from
|
|
12
12
|
* that point later.
|
|
13
|
-
* @param page
|
|
14
|
-
* @returns The continuation token that can be passed into byPage().
|
|
13
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
14
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
15
15
|
*/
|
|
16
16
|
export function getContinuationToken(page) {
|
|
17
17
|
var _a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advisor_operations_test.spec.d.ts","sourceRoot":"","sources":["../../test/advisor_operations_test.spec.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 { AdvisorManagementClient } from "../src/advisorManagementClient";
|
|
12
|
+
const replaceableVariables = {
|
|
13
|
+
AZURE_CLIENT_ID: "azure_client_id",
|
|
14
|
+
AZURE_CLIENT_SECRET: "azure_client_secret",
|
|
15
|
+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
|
16
|
+
SUBSCRIPTION_ID: "azure_subscription_id"
|
|
17
|
+
};
|
|
18
|
+
const recorderOptions = {
|
|
19
|
+
envSetupForPlayback: replaceableVariables
|
|
20
|
+
};
|
|
21
|
+
export const testPollingOptions = {
|
|
22
|
+
updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
|
|
23
|
+
};
|
|
24
|
+
describe("Advisor test", () => {
|
|
25
|
+
let recorder;
|
|
26
|
+
let subscriptionId;
|
|
27
|
+
let client;
|
|
28
|
+
let location;
|
|
29
|
+
let resourceGroup;
|
|
30
|
+
let resourcename;
|
|
31
|
+
beforeEach(function () {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
recorder = new Recorder(this.currentTest);
|
|
34
|
+
yield recorder.start(recorderOptions);
|
|
35
|
+
subscriptionId = env.SUBSCRIPTION_ID || '';
|
|
36
|
+
// This is an example of how the environment variables are used
|
|
37
|
+
const credential = createTestCredential();
|
|
38
|
+
client = new AdvisorManagementClient(credential, subscriptionId, recorder.configureClientOptions({}));
|
|
39
|
+
location = "eastus";
|
|
40
|
+
resourceGroup = "myjstest";
|
|
41
|
+
resourcename = "resourcetest";
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
afterEach(function () {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
yield recorder.stop();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
it("recommendations list test", function () {
|
|
50
|
+
var _a, e_1, _b, _c;
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const top = 5;
|
|
53
|
+
const options = { top };
|
|
54
|
+
const resArray = new Array();
|
|
55
|
+
try {
|
|
56
|
+
for (var _d = true, _e = __asyncValues(client.recommendations.list(options)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
57
|
+
_c = _f.value;
|
|
58
|
+
_d = false;
|
|
59
|
+
try {
|
|
60
|
+
let item = _c;
|
|
61
|
+
resArray.push(item);
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
_d = true;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
69
|
+
finally {
|
|
70
|
+
try {
|
|
71
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
72
|
+
}
|
|
73
|
+
finally { if (e_1) throw e_1.error; }
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=advisor_operations_test.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advisor_operations_test.spec.js","sourceRoot":"","sources":["../../test/advisor_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;AAGpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,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,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,QAAkB,CAAC;IACvB,IAAI,cAAsB,CAAC;IAC3B,IAAI,MAA+B,CAAC;IACpC,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,uBAAuB,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC;YACtG,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,2BAA2B,EAAE;;;YAC9B,MAAM,GAAG,GAAG,CAAC,CAAC;YACd,MAAM,OAAO,GAAsC,EAAE,GAAG,EAAE,CAAC;YAC3D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;gBAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA,IAAA;oBAApC,cAAoC;oBAApC,WAAoC;;wBAAhD,IAAI,IAAI,KAAA,CAAA;wBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;iBACrB;;;;;;;;;;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for AdvisorManagementClient.",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.2.0",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=14.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@azure/core-paging": "^1.2.0",
|
|
12
|
-
"@azure/core-client": "^1.
|
|
12
|
+
"@azure/core-client": "^1.7.0",
|
|
13
13
|
"@azure/core-auth": "^1.3.0",
|
|
14
14
|
"@azure/core-rest-pipeline": "^1.8.0",
|
|
15
15
|
"tslib": "^2.2.0"
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
"@rollup/plugin-json": "^6.0.0",
|
|
32
32
|
"@rollup/plugin-multi-entry": "^6.0.0",
|
|
33
33
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
34
|
-
"mkdirp": "^1.
|
|
34
|
+
"mkdirp": "^2.1.2",
|
|
35
35
|
"rollup": "^2.66.1",
|
|
36
36
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
37
37
|
"typescript": "~5.0.0",
|
|
38
38
|
"uglify-js": "^3.4.9",
|
|
39
39
|
"rimraf": "^3.0.0",
|
|
40
|
+
"dotenv": "^16.0.0",
|
|
40
41
|
"@azure/identity": "^2.0.1",
|
|
41
42
|
"@azure-tools/test-recorder": "^3.0.0",
|
|
42
43
|
"@azure-tools/test-credential": "^1.0.0",
|
|
@@ -45,9 +46,8 @@
|
|
|
45
46
|
"chai": "^4.2.0",
|
|
46
47
|
"cross-env": "^7.0.2",
|
|
47
48
|
"@types/node": "^14.0.0",
|
|
48
|
-
"@azure/dev-tool": "
|
|
49
|
+
"@azure/dev-tool": "^1.0.0"
|
|
49
50
|
},
|
|
50
|
-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/advisor/arm-advisor",
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
|
53
53
|
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
111
|
"autoPublish": true,
|
|
112
|
+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/advisor/arm-advisor",
|
|
112
113
|
"//sampleConfiguration": {
|
|
113
114
|
"productName": "",
|
|
114
115
|
"productSlugs": [
|
|
@@ -13,6 +13,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
|
13
13
|
// (undocumented)
|
|
14
14
|
$host: string;
|
|
15
15
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AdvisorManagementClientOptionalParams);
|
|
16
|
+
constructor(credentials: coreAuth.TokenCredential, options?: AdvisorManagementClientOptionalParams);
|
|
16
17
|
// (undocumented)
|
|
17
18
|
apiVersion: string;
|
|
18
19
|
// (undocumented)
|
|
@@ -24,7 +25,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
|
24
25
|
// (undocumented)
|
|
25
26
|
recommendations: Recommendations;
|
|
26
27
|
// (undocumented)
|
|
27
|
-
subscriptionId
|
|
28
|
+
subscriptionId?: string;
|
|
28
29
|
// (undocumented)
|
|
29
30
|
suppressions: Suppressions;
|
|
30
31
|
}
|
|
@@ -301,9 +302,6 @@ export type RecommendationsGetResponse = ResourceRecommendationBase;
|
|
|
301
302
|
|
|
302
303
|
// @public
|
|
303
304
|
export interface RecommendationsListNextOptionalParams extends coreClient.OperationOptions {
|
|
304
|
-
filter?: string;
|
|
305
|
-
skipToken?: string;
|
|
306
|
-
top?: number;
|
|
307
305
|
}
|
|
308
306
|
|
|
309
307
|
// @public
|
|
@@ -429,8 +427,6 @@ export type SuppressionsGetResponse = SuppressionContract;
|
|
|
429
427
|
|
|
430
428
|
// @public
|
|
431
429
|
export interface SuppressionsListNextOptionalParams extends coreClient.OperationOptions {
|
|
432
|
-
skipToken?: string;
|
|
433
|
-
top?: number;
|
|
434
430
|
}
|
|
435
431
|
|
|
436
432
|
// @public
|
|
@@ -33,7 +33,7 @@ import { AdvisorManagementClientOptionalParams } from "./models";
|
|
|
33
33
|
export class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
34
34
|
$host: string;
|
|
35
35
|
apiVersion: string;
|
|
36
|
-
subscriptionId
|
|
36
|
+
subscriptionId?: string;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Initializes a new instance of the AdvisorManagementClient class.
|
|
@@ -45,12 +45,26 @@ export class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
|
45
45
|
credentials: coreAuth.TokenCredential,
|
|
46
46
|
subscriptionId: string,
|
|
47
47
|
options?: AdvisorManagementClientOptionalParams
|
|
48
|
+
);
|
|
49
|
+
constructor(
|
|
50
|
+
credentials: coreAuth.TokenCredential,
|
|
51
|
+
options?: AdvisorManagementClientOptionalParams
|
|
52
|
+
);
|
|
53
|
+
constructor(
|
|
54
|
+
credentials: coreAuth.TokenCredential,
|
|
55
|
+
subscriptionIdOrOptions?: AdvisorManagementClientOptionalParams | string,
|
|
56
|
+
options?: AdvisorManagementClientOptionalParams
|
|
48
57
|
) {
|
|
49
58
|
if (credentials === undefined) {
|
|
50
59
|
throw new Error("'credentials' cannot be null");
|
|
51
60
|
}
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
|
|
62
|
+
let subscriptionId: string | undefined;
|
|
63
|
+
|
|
64
|
+
if (typeof subscriptionIdOrOptions === "string") {
|
|
65
|
+
subscriptionId = subscriptionIdOrOptions;
|
|
66
|
+
} else if (typeof subscriptionIdOrOptions === "object") {
|
|
67
|
+
options = subscriptionIdOrOptions;
|
|
54
68
|
}
|
|
55
69
|
|
|
56
70
|
// Initializing default values for options
|
|
@@ -62,7 +76,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
|
62
76
|
credential: credentials
|
|
63
77
|
};
|
|
64
78
|
|
|
65
|
-
const packageDetails = `azsdk-js-arm-advisor/3.
|
|
79
|
+
const packageDetails = `azsdk-js-arm-advisor/3.2.0`;
|
|
66
80
|
const userAgentPrefix =
|
|
67
81
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
68
82
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
package/src/models/index.ts
CHANGED
|
@@ -470,14 +470,7 @@ export type RecommendationsGetResponse = ResourceRecommendationBase;
|
|
|
470
470
|
|
|
471
471
|
/** Optional parameters. */
|
|
472
472
|
export interface RecommendationsListNextOptionalParams
|
|
473
|
-
extends coreClient.OperationOptions {
|
|
474
|
-
/** The filter to apply to the recommendations.<br>Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with operators ['eq', 'and', 'or'].<br>Example:<br>- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup' */
|
|
475
|
-
filter?: string;
|
|
476
|
-
/** The number of recommendations per page if a paged version of this API is being used. */
|
|
477
|
-
top?: number;
|
|
478
|
-
/** The page-continuation token to use with a paged version of this API. */
|
|
479
|
-
skipToken?: string;
|
|
480
|
-
}
|
|
473
|
+
extends coreClient.OperationOptions {}
|
|
481
474
|
|
|
482
475
|
/** Contains response data for the listNext operation. */
|
|
483
476
|
export type RecommendationsListNextResponse = ResourceRecommendationBaseListResult;
|
|
@@ -528,12 +521,7 @@ export type SuppressionsListResponse = SuppressionContractListResult;
|
|
|
528
521
|
|
|
529
522
|
/** Optional parameters. */
|
|
530
523
|
export interface SuppressionsListNextOptionalParams
|
|
531
|
-
extends coreClient.OperationOptions {
|
|
532
|
-
/** The number of suppressions per page if a paged version of this API is being used. */
|
|
533
|
-
top?: number;
|
|
534
|
-
/** The page-continuation token to use with a paged version of this API. */
|
|
535
|
-
skipToken?: string;
|
|
536
|
-
}
|
|
524
|
+
extends coreClient.OperationOptions {}
|
|
537
525
|
|
|
538
526
|
/** Contains response data for the listNext operation. */
|
|
539
527
|
export type SuppressionsListNextResponse = SuppressionContractListResult;
|
|
@@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
143
143
|
bodyMapper: Mappers.ArmErrorResponse
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
|
-
queryParameters: [Parameters.apiVersion],
|
|
147
146
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
148
147
|
headerParameters: [Parameters.accept],
|
|
149
148
|
serializer
|
|
@@ -180,7 +180,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
180
180
|
bodyMapper: Mappers.ArmErrorResponse
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
|
-
queryParameters: [Parameters.apiVersion],
|
|
184
183
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
185
184
|
headerParameters: [Parameters.accept],
|
|
186
185
|
serializer
|
|
@@ -261,12 +261,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
261
261
|
bodyMapper: Mappers.ArmErrorResponse
|
|
262
262
|
}
|
|
263
263
|
},
|
|
264
|
-
queryParameters: [
|
|
265
|
-
Parameters.apiVersion,
|
|
266
|
-
Parameters.filter,
|
|
267
|
-
Parameters.top,
|
|
268
|
-
Parameters.skipToken
|
|
269
|
-
],
|
|
270
264
|
urlParameters: [
|
|
271
265
|
Parameters.$host,
|
|
272
266
|
Parameters.nextLink,
|
|
@@ -294,11 +294,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
294
294
|
bodyMapper: Mappers.ArmErrorResponse
|
|
295
295
|
}
|
|
296
296
|
},
|
|
297
|
-
queryParameters: [
|
|
298
|
-
Parameters.apiVersion,
|
|
299
|
-
Parameters.top,
|
|
300
|
-
Parameters.skipToken
|
|
301
|
-
],
|
|
302
297
|
urlParameters: [
|
|
303
298
|
Parameters.$host,
|
|
304
299
|
Parameters.nextLink,
|
package/src/pagingHelper.ts
CHANGED
|
@@ -13,11 +13,11 @@ export interface PageInfo {
|
|
|
13
13
|
const pageMap = new WeakMap<object, PageInfo>();
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Given
|
|
17
|
-
* continuation token that can be used to begin paging from
|
|
16
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
17
|
+
* returns a continuation token that can be used to begin paging from
|
|
18
18
|
* that point later.
|
|
19
|
-
* @param page
|
|
20
|
-
* @returns The continuation token that can be passed into byPage().
|
|
19
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
21
21
|
*/
|
|
22
22
|
export function getContinuationToken(page: unknown): string | undefined {
|
|
23
23
|
if (typeof page !== "object" || page === null) {
|
package/types/arm-advisor.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
|
5
5
|
export declare class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
6
6
|
$host: string;
|
|
7
7
|
apiVersion: string;
|
|
8
|
-
subscriptionId
|
|
8
|
+
subscriptionId?: string;
|
|
9
9
|
/**
|
|
10
10
|
* Initializes a new instance of the AdvisorManagementClient class.
|
|
11
11
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -13,6 +13,7 @@ export declare class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
|
13
13
|
* @param options The parameter options
|
|
14
14
|
*/
|
|
15
15
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AdvisorManagementClientOptionalParams);
|
|
16
|
+
constructor(credentials: coreAuth.TokenCredential, options?: AdvisorManagementClientOptionalParams);
|
|
16
17
|
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
17
18
|
private addCustomApiVersionPolicy;
|
|
18
19
|
recommendationMetadata: RecommendationMetadata;
|
|
@@ -190,11 +191,11 @@ export declare interface DigestConfig {
|
|
|
190
191
|
export declare type DigestConfigState = string;
|
|
191
192
|
|
|
192
193
|
/**
|
|
193
|
-
* Given
|
|
194
|
-
* continuation token that can be used to begin paging from
|
|
194
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
195
|
+
* returns a continuation token that can be used to begin paging from
|
|
195
196
|
* that point later.
|
|
196
|
-
* @param page
|
|
197
|
-
* @returns The continuation token that can be passed into byPage().
|
|
197
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
198
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
198
199
|
*/
|
|
199
200
|
export declare function getContinuationToken(page: unknown): string | undefined;
|
|
200
201
|
|
|
@@ -457,12 +458,6 @@ export declare type RecommendationsGetResponse = ResourceRecommendationBase;
|
|
|
457
458
|
|
|
458
459
|
/** Optional parameters. */
|
|
459
460
|
export declare interface RecommendationsListNextOptionalParams extends coreClient.OperationOptions {
|
|
460
|
-
/** The filter to apply to the recommendations.<br>Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with operators ['eq', 'and', 'or'].<br>Example:<br>- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup' */
|
|
461
|
-
filter?: string;
|
|
462
|
-
/** The number of recommendations per page if a paged version of this API is being used. */
|
|
463
|
-
top?: number;
|
|
464
|
-
/** The page-continuation token to use with a paged version of this API. */
|
|
465
|
-
skipToken?: string;
|
|
466
461
|
}
|
|
467
462
|
|
|
468
463
|
/** Contains response data for the listNext operation. */
|
|
@@ -686,10 +681,6 @@ export declare type SuppressionsGetResponse = SuppressionContract;
|
|
|
686
681
|
|
|
687
682
|
/** Optional parameters. */
|
|
688
683
|
export declare interface SuppressionsListNextOptionalParams extends coreClient.OperationOptions {
|
|
689
|
-
/** The number of suppressions per page if a paged version of this API is being used. */
|
|
690
|
-
top?: number;
|
|
691
|
-
/** The page-continuation token to use with a paged version of this API. */
|
|
692
|
-
skipToken?: string;
|
|
693
684
|
}
|
|
694
685
|
|
|
695
686
|
/** Contains response data for the listNext operation. */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampleTest.d.ts","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":""}
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
import { Recorder } from "@azure-tools/test-recorder";
|
|
10
|
-
const replaceableVariables = {
|
|
11
|
-
AZURE_CLIENT_ID: "azure_client_id",
|
|
12
|
-
AZURE_CLIENT_SECRET: "azure_client_secret",
|
|
13
|
-
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
|
14
|
-
SUBSCRIPTION_ID: "azure_subscription_id"
|
|
15
|
-
};
|
|
16
|
-
const recorderOptions = {
|
|
17
|
-
envSetupForPlayback: replaceableVariables
|
|
18
|
-
};
|
|
19
|
-
describe("My test", () => {
|
|
20
|
-
let recorder;
|
|
21
|
-
beforeEach(function () {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
recorder = new Recorder(this.currentTest);
|
|
24
|
-
yield recorder.start(recorderOptions);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
afterEach(function () {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
yield recorder.stop();
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
it("sample test", function () {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
console.log("Hi, I'm a test!");
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=sampleTest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAIpC,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,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACxC,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"}
|