@azure/arm-advisor 3.2.0-alpha.20241218.1 → 3.2.0-alpha.20241220.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/{dist-esm/src → dist/commonjs}/advisorManagementClient.d.ts +2 -2
- package/dist/commonjs/advisorManagementClient.d.ts.map +1 -0
- package/dist/commonjs/advisorManagementClient.js +103 -0
- package/dist/commonjs/advisorManagementClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/{dist-esm/src → dist/commonjs}/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +77 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.js +652 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.js +172 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/configurations.d.ts +3 -3
- package/dist/commonjs/operations/configurations.d.ts.map +1 -0
- package/dist/commonjs/operations/configurations.js +271 -0
- package/dist/commonjs/operations/configurations.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +6 -0
- package/{dist-esm/src → dist/commonjs}/operations/index.d.ts.map +1 -1
- package/dist/commonjs/operations/index.js +16 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/operations.d.ts +3 -3
- package/dist/commonjs/operations/operations.d.ts.map +1 -0
- package/dist/commonjs/operations/operations.js +137 -0
- package/dist/commonjs/operations/operations.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/recommendationMetadata.d.ts +3 -3
- package/dist/commonjs/operations/recommendationMetadata.d.ts.map +1 -0
- package/dist/commonjs/operations/recommendationMetadata.js +165 -0
- package/dist/commonjs/operations/recommendationMetadata.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/recommendations.d.ts +3 -3
- package/dist/commonjs/operations/recommendations.d.ts.map +1 -0
- package/dist/commonjs/operations/recommendations.js +215 -0
- package/dist/commonjs/operations/recommendations.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/suppressions.d.ts +3 -3
- package/dist/commonjs/operations/suppressions.d.ts.map +1 -0
- package/dist/commonjs/operations/suppressions.js +247 -0
- package/dist/commonjs/operations/suppressions.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/configurations.d.ts +1 -1
- package/dist/commonjs/operationsInterfaces/configurations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/configurations.js +10 -0
- package/dist/commonjs/operationsInterfaces/configurations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +6 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/index.js +16 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/operations.d.ts +1 -1
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/operations.js +10 -0
- package/dist/commonjs/operationsInterfaces/operations.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/recommendationMetadata.d.ts +1 -1
- package/dist/commonjs/operationsInterfaces/recommendationMetadata.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/recommendationMetadata.js +10 -0
- package/dist/commonjs/operationsInterfaces/recommendationMetadata.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/recommendations.d.ts +1 -1
- package/dist/commonjs/operationsInterfaces/recommendations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/recommendations.js +10 -0
- package/dist/commonjs/operationsInterfaces/recommendations.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/suppressions.d.ts +1 -1
- package/dist/commonjs/operationsInterfaces/suppressions.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/suppressions.js +10 -0
- package/dist/commonjs/operationsInterfaces/suppressions.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/{dist-esm/src → dist/commonjs}/pagingHelper.d.ts.map +1 -1
- package/dist/commonjs/pagingHelper.js +36 -0
- package/dist/commonjs/pagingHelper.js.map +1 -0
- package/dist/esm/advisorManagementClient.d.ts +25 -0
- package/dist/esm/advisorManagementClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/advisorManagementClient.js +22 -26
- package/dist/esm/advisorManagementClient.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/index.js +4 -4
- package/dist/esm/index.js.map +1 -0
- package/{types/arm-advisor.d.ts → dist/esm/models/index.d.ts} +466 -700
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +21 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/models/mappers.js +225 -225
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +19 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/models/parameters.js +48 -48
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/configurations.d.ts +62 -0
- package/dist/esm/operations/configurations.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/configurations.js +29 -41
- package/dist/esm/operations/configurations.js.map +1 -0
- package/dist/esm/operations/index.d.ts +6 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/{dist-esm/src/operationsInterfaces → dist/esm/operations}/index.js +5 -5
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/operations.d.ts +32 -0
- package/dist/esm/operations/operations.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/operations.js +12 -12
- package/dist/esm/operations/operations.js.map +1 -0
- package/dist/esm/operations/recommendationMetadata.d.ts +38 -0
- package/dist/esm/operations/recommendationMetadata.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/recommendationMetadata.js +17 -17
- package/dist/esm/operations/recommendationMetadata.js.map +1 -0
- package/dist/esm/operations/recommendations.d.ts +57 -0
- package/dist/esm/operations/recommendations.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/recommendations.js +27 -44
- package/dist/esm/operations/recommendations.js.map +1 -0
- package/dist/esm/operations/suppressions.d.ts +65 -0
- package/dist/esm/operations/suppressions.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/suppressions.js +30 -38
- package/dist/esm/operations/suppressions.js.map +1 -0
- package/dist/esm/operationsInterfaces/configurations.d.ts +33 -0
- package/dist/esm/operationsInterfaces/configurations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/configurations.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +6 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/{dist-esm/src/operations → dist/esm/operationsInterfaces}/index.js +5 -5
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/operations.d.ts +11 -0
- package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/operations.js.map +1 -0
- package/dist/esm/operationsInterfaces/recommendationMetadata.d.ts +17 -0
- package/dist/esm/operationsInterfaces/recommendationMetadata.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/recommendationMetadata.js.map +1 -0
- package/dist/esm/operationsInterfaces/recommendations.d.ts +35 -0
- package/dist/esm/operationsInterfaces/recommendations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/recommendations.js.map +1 -0
- package/dist/esm/operationsInterfaces/suppressions.d.ts +43 -0
- package/dist/esm/operationsInterfaces/suppressions.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/suppressions.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pagingHelper.d.ts +13 -0
- package/dist/esm/pagingHelper.d.ts.map +1 -0
- package/dist/esm/pagingHelper.js.map +1 -0
- package/package.json +51 -35
- package/dist/index.js +0 -2102
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.d.ts +0 -2
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.js +0 -58
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.js.map +0 -1
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.d.ts +0 -2
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.js +0 -57
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.js.map +0 -1
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.d.ts +0 -2
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.js +0 -53
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.js.map +0 -1
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.d.ts +0 -2
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.js +0 -52
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationMetadataGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationMetadataGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationMetadataGetSample.js +0 -36
- package/dist-esm/samples-dev/recommendationMetadataGetSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationMetadataListSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationMetadataListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationMetadataListSample.js +0 -51
- package/dist-esm/samples-dev/recommendationMetadataListSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationsGenerateSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationsGenerateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationsGenerateSample.js +0 -36
- package/dist-esm/samples-dev/recommendationsGenerateSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.js +0 -37
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationsGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationsGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationsGetSample.js +0 -37
- package/dist-esm/samples-dev/recommendationsGetSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationsListSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationsListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationsListSample.js +0 -54
- package/dist-esm/samples-dev/recommendationsListSample.js.map +0 -1
- package/dist-esm/samples-dev/suppressionsCreateSample.d.ts +0 -2
- package/dist-esm/samples-dev/suppressionsCreateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/suppressionsCreateSample.js +0 -39
- package/dist-esm/samples-dev/suppressionsCreateSample.js.map +0 -1
- package/dist-esm/samples-dev/suppressionsDeleteSample.d.ts +0 -2
- package/dist-esm/samples-dev/suppressionsDeleteSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/suppressionsDeleteSample.js +0 -38
- package/dist-esm/samples-dev/suppressionsDeleteSample.js.map +0 -1
- package/dist-esm/samples-dev/suppressionsGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/suppressionsGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/suppressionsGetSample.js +0 -38
- package/dist-esm/samples-dev/suppressionsGetSample.js.map +0 -1
- package/dist-esm/samples-dev/suppressionsListSample.d.ts +0 -2
- package/dist-esm/samples-dev/suppressionsListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/suppressionsListSample.js +0 -52
- package/dist-esm/samples-dev/suppressionsListSample.js.map +0 -1
- package/dist-esm/src/advisorManagementClient.d.ts.map +0 -1
- package/dist-esm/src/advisorManagementClient.js.map +0 -1
- package/dist-esm/src/index.d.ts +0 -5
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/models/mappers.js.map +0 -1
- package/dist-esm/src/models/parameters.js.map +0 -1
- package/dist-esm/src/operations/configurations.d.ts.map +0 -1
- package/dist-esm/src/operations/configurations.js.map +0 -1
- package/dist-esm/src/operations/index.d.ts +0 -6
- package/dist-esm/src/operations/index.js.map +0 -1
- package/dist-esm/src/operations/operations.d.ts.map +0 -1
- package/dist-esm/src/operations/operations.js.map +0 -1
- package/dist-esm/src/operations/recommendationMetadata.d.ts.map +0 -1
- package/dist-esm/src/operations/recommendationMetadata.js.map +0 -1
- package/dist-esm/src/operations/recommendations.d.ts.map +0 -1
- package/dist-esm/src/operations/recommendations.js.map +0 -1
- package/dist-esm/src/operations/suppressions.d.ts.map +0 -1
- package/dist-esm/src/operations/suppressions.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/configurations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +0 -6
- package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/operations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/recommendationMetadata.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/recommendationMetadata.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/recommendations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/recommendations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/suppressions.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/suppressions.js.map +0 -1
- package/dist-esm/src/pagingHelper.js.map +0 -1
- package/dist-esm/test/advisor_operations_test.spec.d.ts +0 -4
- package/dist-esm/test/advisor_operations_test.spec.d.ts.map +0 -1
- package/dist-esm/test/advisor_operations_test.spec.js +0 -77
- package/dist-esm/test/advisor_operations_test.spec.js.map +0 -1
- package/src/advisorManagementClient.ts +0 -174
- package/src/index.ts +0 -13
- package/src/models/index.ts +0 -538
- package/src/models/mappers.ts +0 -700
- package/src/models/parameters.ts +0 -194
- package/src/operations/configurations.ts +0 -336
- package/src/operations/index.ts +0 -13
- package/src/operations/operations.ts +0 -149
- package/src/operations/recommendationMetadata.ts +0 -186
- package/src/operations/recommendations.ts +0 -271
- package/src/operations/suppressions.ts +0 -304
- package/src/operationsInterfaces/configurations.ts +0 -65
- package/src/operationsInterfaces/index.ts +0 -13
- package/src/operationsInterfaces/operations.ts +0 -22
- package/src/operationsInterfaces/recommendationMetadata.ts +0 -36
- package/src/operationsInterfaces/recommendations.ts +0 -63
- package/src/operationsInterfaces/suppressions.ts +0 -78
- package/src/pagingHelper.ts +0 -39
- package/tsconfig.json +0 -33
- /package/{dist-esm/src → dist/commonjs}/models/index.d.ts +0 -0
- /package/{dist-esm/src → dist/commonjs}/models/mappers.d.ts +0 -0
- /package/{dist-esm/src → dist/commonjs}/models/mappers.d.ts.map +0 -0
- /package/{dist-esm/src → dist/commonjs}/models/parameters.d.ts +0 -0
- /package/{dist-esm/src → dist/commonjs}/models/parameters.d.ts.map +0 -0
- /package/{dist-esm/src → dist/commonjs}/pagingHelper.d.ts +0 -0
- /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
- /package/{dist-esm/src → dist/esm}/models/index.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/configurations.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/operations.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/recommendationMetadata.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/recommendations.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/suppressions.js +0 -0
- /package/{dist-esm/src → dist/esm}/pagingHelper.js +0 -0
|
@@ -1,304 +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
|
-
|
|
9
|
-
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
-
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
-
import { Suppressions } from "../operationsInterfaces";
|
|
12
|
-
import * as coreClient from "@azure/core-client";
|
|
13
|
-
import * as Mappers from "../models/mappers";
|
|
14
|
-
import * as Parameters from "../models/parameters";
|
|
15
|
-
import { AdvisorManagementClient } from "../advisorManagementClient";
|
|
16
|
-
import {
|
|
17
|
-
SuppressionContract,
|
|
18
|
-
SuppressionsListNextOptionalParams,
|
|
19
|
-
SuppressionsListOptionalParams,
|
|
20
|
-
SuppressionsListResponse,
|
|
21
|
-
SuppressionsGetOptionalParams,
|
|
22
|
-
SuppressionsGetResponse,
|
|
23
|
-
SuppressionsCreateOptionalParams,
|
|
24
|
-
SuppressionsCreateResponse,
|
|
25
|
-
SuppressionsDeleteOptionalParams,
|
|
26
|
-
SuppressionsListNextResponse
|
|
27
|
-
} from "../models";
|
|
28
|
-
|
|
29
|
-
/// <reference lib="esnext.asynciterable" />
|
|
30
|
-
/** Class containing Suppressions operations. */
|
|
31
|
-
export class SuppressionsImpl implements Suppressions {
|
|
32
|
-
private readonly client: AdvisorManagementClient;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Initialize a new instance of the class Suppressions class.
|
|
36
|
-
* @param client Reference to the service client
|
|
37
|
-
*/
|
|
38
|
-
constructor(client: AdvisorManagementClient) {
|
|
39
|
-
this.client = client;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed
|
|
44
|
-
* attribute of a recommendation is referred to as a suppression.
|
|
45
|
-
* @param options The options parameters.
|
|
46
|
-
*/
|
|
47
|
-
public list(
|
|
48
|
-
options?: SuppressionsListOptionalParams
|
|
49
|
-
): PagedAsyncIterableIterator<SuppressionContract> {
|
|
50
|
-
const iter = this.listPagingAll(options);
|
|
51
|
-
return {
|
|
52
|
-
next() {
|
|
53
|
-
return iter.next();
|
|
54
|
-
},
|
|
55
|
-
[Symbol.asyncIterator]() {
|
|
56
|
-
return this;
|
|
57
|
-
},
|
|
58
|
-
byPage: (settings?: PageSettings) => {
|
|
59
|
-
if (settings?.maxPageSize) {
|
|
60
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
|
61
|
-
}
|
|
62
|
-
return this.listPagingPage(options, settings);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
private async *listPagingPage(
|
|
68
|
-
options?: SuppressionsListOptionalParams,
|
|
69
|
-
settings?: PageSettings
|
|
70
|
-
): AsyncIterableIterator<SuppressionContract[]> {
|
|
71
|
-
let result: SuppressionsListResponse;
|
|
72
|
-
let continuationToken = settings?.continuationToken;
|
|
73
|
-
if (!continuationToken) {
|
|
74
|
-
result = await this._list(options);
|
|
75
|
-
let page = result.value || [];
|
|
76
|
-
continuationToken = result.nextLink;
|
|
77
|
-
setContinuationToken(page, continuationToken);
|
|
78
|
-
yield page;
|
|
79
|
-
}
|
|
80
|
-
while (continuationToken) {
|
|
81
|
-
result = await this._listNext(continuationToken, options);
|
|
82
|
-
continuationToken = result.nextLink;
|
|
83
|
-
let page = result.value || [];
|
|
84
|
-
setContinuationToken(page, continuationToken);
|
|
85
|
-
yield page;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private async *listPagingAll(
|
|
90
|
-
options?: SuppressionsListOptionalParams
|
|
91
|
-
): AsyncIterableIterator<SuppressionContract> {
|
|
92
|
-
for await (const page of this.listPagingPage(options)) {
|
|
93
|
-
yield* page;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Obtains the details of a suppression.
|
|
99
|
-
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
100
|
-
* the recommendation applies.
|
|
101
|
-
* @param recommendationId The recommendation ID.
|
|
102
|
-
* @param name The name of the suppression.
|
|
103
|
-
* @param options The options parameters.
|
|
104
|
-
*/
|
|
105
|
-
get(
|
|
106
|
-
resourceUri: string,
|
|
107
|
-
recommendationId: string,
|
|
108
|
-
name: string,
|
|
109
|
-
options?: SuppressionsGetOptionalParams
|
|
110
|
-
): Promise<SuppressionsGetResponse> {
|
|
111
|
-
return this.client.sendOperationRequest(
|
|
112
|
-
{ resourceUri, recommendationId, name, options },
|
|
113
|
-
getOperationSpec
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute
|
|
119
|
-
* is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of
|
|
120
|
-
* a recommendation.
|
|
121
|
-
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
122
|
-
* the recommendation applies.
|
|
123
|
-
* @param recommendationId The recommendation ID.
|
|
124
|
-
* @param name The name of the suppression.
|
|
125
|
-
* @param suppressionContract The snoozed or dismissed attribute; for example, the snooze duration.
|
|
126
|
-
* @param options The options parameters.
|
|
127
|
-
*/
|
|
128
|
-
create(
|
|
129
|
-
resourceUri: string,
|
|
130
|
-
recommendationId: string,
|
|
131
|
-
name: string,
|
|
132
|
-
suppressionContract: SuppressionContract,
|
|
133
|
-
options?: SuppressionsCreateOptionalParams
|
|
134
|
-
): Promise<SuppressionsCreateResponse> {
|
|
135
|
-
return this.client.sendOperationRequest(
|
|
136
|
-
{ resourceUri, recommendationId, name, suppressionContract, options },
|
|
137
|
-
createOperationSpec
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute
|
|
143
|
-
* of a recommendation is referred to as a suppression.
|
|
144
|
-
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
145
|
-
* the recommendation applies.
|
|
146
|
-
* @param recommendationId The recommendation ID.
|
|
147
|
-
* @param name The name of the suppression.
|
|
148
|
-
* @param options The options parameters.
|
|
149
|
-
*/
|
|
150
|
-
delete(
|
|
151
|
-
resourceUri: string,
|
|
152
|
-
recommendationId: string,
|
|
153
|
-
name: string,
|
|
154
|
-
options?: SuppressionsDeleteOptionalParams
|
|
155
|
-
): Promise<void> {
|
|
156
|
-
return this.client.sendOperationRequest(
|
|
157
|
-
{ resourceUri, recommendationId, name, options },
|
|
158
|
-
deleteOperationSpec
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed
|
|
164
|
-
* attribute of a recommendation is referred to as a suppression.
|
|
165
|
-
* @param options The options parameters.
|
|
166
|
-
*/
|
|
167
|
-
private _list(
|
|
168
|
-
options?: SuppressionsListOptionalParams
|
|
169
|
-
): Promise<SuppressionsListResponse> {
|
|
170
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* ListNext
|
|
175
|
-
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
176
|
-
* @param options The options parameters.
|
|
177
|
-
*/
|
|
178
|
-
private _listNext(
|
|
179
|
-
nextLink: string,
|
|
180
|
-
options?: SuppressionsListNextOptionalParams
|
|
181
|
-
): Promise<SuppressionsListNextResponse> {
|
|
182
|
-
return this.client.sendOperationRequest(
|
|
183
|
-
{ nextLink, options },
|
|
184
|
-
listNextOperationSpec
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
// Operation Specifications
|
|
189
|
-
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
190
|
-
|
|
191
|
-
const getOperationSpec: coreClient.OperationSpec = {
|
|
192
|
-
path:
|
|
193
|
-
"/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}",
|
|
194
|
-
httpMethod: "GET",
|
|
195
|
-
responses: {
|
|
196
|
-
200: {
|
|
197
|
-
bodyMapper: Mappers.SuppressionContract
|
|
198
|
-
},
|
|
199
|
-
404: {
|
|
200
|
-
bodyMapper: Mappers.ArmErrorResponse,
|
|
201
|
-
isError: true
|
|
202
|
-
},
|
|
203
|
-
default: {
|
|
204
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
queryParameters: [Parameters.apiVersion],
|
|
208
|
-
urlParameters: [
|
|
209
|
-
Parameters.$host,
|
|
210
|
-
Parameters.name,
|
|
211
|
-
Parameters.resourceUri,
|
|
212
|
-
Parameters.recommendationId
|
|
213
|
-
],
|
|
214
|
-
headerParameters: [Parameters.accept],
|
|
215
|
-
serializer
|
|
216
|
-
};
|
|
217
|
-
const createOperationSpec: coreClient.OperationSpec = {
|
|
218
|
-
path:
|
|
219
|
-
"/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}",
|
|
220
|
-
httpMethod: "PUT",
|
|
221
|
-
responses: {
|
|
222
|
-
200: {
|
|
223
|
-
bodyMapper: Mappers.SuppressionContract
|
|
224
|
-
},
|
|
225
|
-
404: {
|
|
226
|
-
bodyMapper: Mappers.ArmErrorResponse,
|
|
227
|
-
isError: true
|
|
228
|
-
},
|
|
229
|
-
default: {
|
|
230
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
requestBody: Parameters.suppressionContract,
|
|
234
|
-
queryParameters: [Parameters.apiVersion],
|
|
235
|
-
urlParameters: [
|
|
236
|
-
Parameters.$host,
|
|
237
|
-
Parameters.name,
|
|
238
|
-
Parameters.resourceUri,
|
|
239
|
-
Parameters.recommendationId
|
|
240
|
-
],
|
|
241
|
-
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
242
|
-
mediaType: "json",
|
|
243
|
-
serializer
|
|
244
|
-
};
|
|
245
|
-
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
246
|
-
path:
|
|
247
|
-
"/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}",
|
|
248
|
-
httpMethod: "DELETE",
|
|
249
|
-
responses: {
|
|
250
|
-
204: {},
|
|
251
|
-
default: {
|
|
252
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
queryParameters: [Parameters.apiVersion],
|
|
256
|
-
urlParameters: [
|
|
257
|
-
Parameters.$host,
|
|
258
|
-
Parameters.name,
|
|
259
|
-
Parameters.resourceUri,
|
|
260
|
-
Parameters.recommendationId
|
|
261
|
-
],
|
|
262
|
-
headerParameters: [Parameters.accept],
|
|
263
|
-
serializer
|
|
264
|
-
};
|
|
265
|
-
const listOperationSpec: coreClient.OperationSpec = {
|
|
266
|
-
path:
|
|
267
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/suppressions",
|
|
268
|
-
httpMethod: "GET",
|
|
269
|
-
responses: {
|
|
270
|
-
200: {
|
|
271
|
-
bodyMapper: Mappers.SuppressionContractListResult
|
|
272
|
-
},
|
|
273
|
-
default: {
|
|
274
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
queryParameters: [
|
|
278
|
-
Parameters.apiVersion,
|
|
279
|
-
Parameters.top,
|
|
280
|
-
Parameters.skipToken
|
|
281
|
-
],
|
|
282
|
-
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
283
|
-
headerParameters: [Parameters.accept],
|
|
284
|
-
serializer
|
|
285
|
-
};
|
|
286
|
-
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
287
|
-
path: "{nextLink}",
|
|
288
|
-
httpMethod: "GET",
|
|
289
|
-
responses: {
|
|
290
|
-
200: {
|
|
291
|
-
bodyMapper: Mappers.SuppressionContractListResult
|
|
292
|
-
},
|
|
293
|
-
default: {
|
|
294
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
urlParameters: [
|
|
298
|
-
Parameters.$host,
|
|
299
|
-
Parameters.nextLink,
|
|
300
|
-
Parameters.subscriptionId
|
|
301
|
-
],
|
|
302
|
-
headerParameters: [Parameters.accept],
|
|
303
|
-
serializer
|
|
304
|
-
};
|
|
@@ -1,65 +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
|
-
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
-
import {
|
|
11
|
-
ConfigData,
|
|
12
|
-
ConfigurationsListBySubscriptionOptionalParams,
|
|
13
|
-
ConfigurationsListByResourceGroupOptionalParams,
|
|
14
|
-
ConfigurationName,
|
|
15
|
-
ConfigurationsCreateInSubscriptionOptionalParams,
|
|
16
|
-
ConfigurationsCreateInSubscriptionResponse,
|
|
17
|
-
ConfigurationsCreateInResourceGroupOptionalParams,
|
|
18
|
-
ConfigurationsCreateInResourceGroupResponse
|
|
19
|
-
} from "../models";
|
|
20
|
-
|
|
21
|
-
/// <reference lib="esnext.asynciterable" />
|
|
22
|
-
/** Interface representing a Configurations. */
|
|
23
|
-
export interface Configurations {
|
|
24
|
-
/**
|
|
25
|
-
* Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
|
|
26
|
-
* @param options The options parameters.
|
|
27
|
-
*/
|
|
28
|
-
listBySubscription(
|
|
29
|
-
options?: ConfigurationsListBySubscriptionOptionalParams
|
|
30
|
-
): PagedAsyncIterableIterator<ConfigData>;
|
|
31
|
-
/**
|
|
32
|
-
* Retrieve Azure Advisor configurations.
|
|
33
|
-
* @param resourceGroup The name of the Azure resource group.
|
|
34
|
-
* @param options The options parameters.
|
|
35
|
-
*/
|
|
36
|
-
listByResourceGroup(
|
|
37
|
-
resourceGroup: string,
|
|
38
|
-
options?: ConfigurationsListByResourceGroupOptionalParams
|
|
39
|
-
): PagedAsyncIterableIterator<ConfigData>;
|
|
40
|
-
/**
|
|
41
|
-
* Create/Overwrite Azure Advisor configuration and also delete all configurations of contained
|
|
42
|
-
* resource groups.
|
|
43
|
-
* @param configurationName Advisor configuration name. Value must be 'default'
|
|
44
|
-
* @param configContract The Azure Advisor configuration data structure.
|
|
45
|
-
* @param options The options parameters.
|
|
46
|
-
*/
|
|
47
|
-
createInSubscription(
|
|
48
|
-
configurationName: ConfigurationName,
|
|
49
|
-
configContract: ConfigData,
|
|
50
|
-
options?: ConfigurationsCreateInSubscriptionOptionalParams
|
|
51
|
-
): Promise<ConfigurationsCreateInSubscriptionResponse>;
|
|
52
|
-
/**
|
|
53
|
-
* Create/Overwrite Azure Advisor configuration.
|
|
54
|
-
* @param configurationName Advisor configuration name. Value must be 'default'
|
|
55
|
-
* @param resourceGroup The name of the Azure resource group.
|
|
56
|
-
* @param configContract The Azure Advisor configuration data structure.
|
|
57
|
-
* @param options The options parameters.
|
|
58
|
-
*/
|
|
59
|
-
createInResourceGroup(
|
|
60
|
-
configurationName: ConfigurationName,
|
|
61
|
-
resourceGroup: string,
|
|
62
|
-
configContract: ConfigData,
|
|
63
|
-
options?: ConfigurationsCreateInResourceGroupOptionalParams
|
|
64
|
-
): Promise<ConfigurationsCreateInResourceGroupResponse>;
|
|
65
|
-
}
|
|
@@ -1,13 +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
|
-
|
|
9
|
-
export * from "./recommendationMetadata";
|
|
10
|
-
export * from "./configurations";
|
|
11
|
-
export * from "./recommendations";
|
|
12
|
-
export * from "./operations";
|
|
13
|
-
export * from "./suppressions";
|
|
@@ -1,22 +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
|
-
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
-
import { OperationEntity, OperationsListOptionalParams } from "../models";
|
|
11
|
-
|
|
12
|
-
/// <reference lib="esnext.asynciterable" />
|
|
13
|
-
/** Interface representing a Operations. */
|
|
14
|
-
export interface Operations {
|
|
15
|
-
/**
|
|
16
|
-
* Lists all the available Advisor REST API operations.
|
|
17
|
-
* @param options The options parameters.
|
|
18
|
-
*/
|
|
19
|
-
list(
|
|
20
|
-
options?: OperationsListOptionalParams
|
|
21
|
-
): PagedAsyncIterableIterator<OperationEntity>;
|
|
22
|
-
}
|
|
@@ -1,36 +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
|
-
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
-
import {
|
|
11
|
-
MetadataEntity,
|
|
12
|
-
RecommendationMetadataListOptionalParams,
|
|
13
|
-
RecommendationMetadataGetOptionalParams,
|
|
14
|
-
RecommendationMetadataGetResponse
|
|
15
|
-
} from "../models";
|
|
16
|
-
|
|
17
|
-
/// <reference lib="esnext.asynciterable" />
|
|
18
|
-
/** Interface representing a RecommendationMetadata. */
|
|
19
|
-
export interface RecommendationMetadata {
|
|
20
|
-
/**
|
|
21
|
-
* Gets the list of metadata entities.
|
|
22
|
-
* @param options The options parameters.
|
|
23
|
-
*/
|
|
24
|
-
list(
|
|
25
|
-
options?: RecommendationMetadataListOptionalParams
|
|
26
|
-
): PagedAsyncIterableIterator<MetadataEntity>;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the metadata entity.
|
|
29
|
-
* @param name Name of metadata entity.
|
|
30
|
-
* @param options The options parameters.
|
|
31
|
-
*/
|
|
32
|
-
get(
|
|
33
|
-
name: string,
|
|
34
|
-
options?: RecommendationMetadataGetOptionalParams
|
|
35
|
-
): Promise<RecommendationMetadataGetResponse>;
|
|
36
|
-
}
|
|
@@ -1,63 +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
|
-
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
-
import {
|
|
11
|
-
ResourceRecommendationBase,
|
|
12
|
-
RecommendationsListOptionalParams,
|
|
13
|
-
RecommendationsGenerateOptionalParams,
|
|
14
|
-
RecommendationsGenerateResponse,
|
|
15
|
-
RecommendationsGetGenerateStatusOptionalParams,
|
|
16
|
-
RecommendationsGetOptionalParams,
|
|
17
|
-
RecommendationsGetResponse
|
|
18
|
-
} from "../models";
|
|
19
|
-
|
|
20
|
-
/// <reference lib="esnext.asynciterable" />
|
|
21
|
-
/** Interface representing a Recommendations. */
|
|
22
|
-
export interface Recommendations {
|
|
23
|
-
/**
|
|
24
|
-
* Obtains cached recommendations for a subscription. The recommendations are generated or computed by
|
|
25
|
-
* invoking generateRecommendations.
|
|
26
|
-
* @param options The options parameters.
|
|
27
|
-
*/
|
|
28
|
-
list(
|
|
29
|
-
options?: RecommendationsListOptionalParams
|
|
30
|
-
): PagedAsyncIterableIterator<ResourceRecommendationBase>;
|
|
31
|
-
/**
|
|
32
|
-
* Initiates the recommendation generation or computation process for a subscription. This operation is
|
|
33
|
-
* asynchronous. The generated recommendations are stored in a cache in the Advisor service.
|
|
34
|
-
* @param options The options parameters.
|
|
35
|
-
*/
|
|
36
|
-
generate(
|
|
37
|
-
options?: RecommendationsGenerateOptionalParams
|
|
38
|
-
): Promise<RecommendationsGenerateResponse>;
|
|
39
|
-
/**
|
|
40
|
-
* Retrieves the status of the recommendation computation or generation process. Invoke this API after
|
|
41
|
-
* calling the generation recommendation. The URI of this API is returned in the Location field of the
|
|
42
|
-
* response header.
|
|
43
|
-
* @param operationId The operation ID, which can be found from the Location field in the generate
|
|
44
|
-
* recommendation response header.
|
|
45
|
-
* @param options The options parameters.
|
|
46
|
-
*/
|
|
47
|
-
getGenerateStatus(
|
|
48
|
-
operationId: string,
|
|
49
|
-
options?: RecommendationsGetGenerateStatusOptionalParams
|
|
50
|
-
): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Obtains details of a cached recommendation.
|
|
53
|
-
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
54
|
-
* the recommendation applies.
|
|
55
|
-
* @param recommendationId The recommendation ID.
|
|
56
|
-
* @param options The options parameters.
|
|
57
|
-
*/
|
|
58
|
-
get(
|
|
59
|
-
resourceUri: string,
|
|
60
|
-
recommendationId: string,
|
|
61
|
-
options?: RecommendationsGetOptionalParams
|
|
62
|
-
): Promise<RecommendationsGetResponse>;
|
|
63
|
-
}
|
|
@@ -1,78 +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
|
-
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
-
import {
|
|
11
|
-
SuppressionContract,
|
|
12
|
-
SuppressionsListOptionalParams,
|
|
13
|
-
SuppressionsGetOptionalParams,
|
|
14
|
-
SuppressionsGetResponse,
|
|
15
|
-
SuppressionsCreateOptionalParams,
|
|
16
|
-
SuppressionsCreateResponse,
|
|
17
|
-
SuppressionsDeleteOptionalParams
|
|
18
|
-
} from "../models";
|
|
19
|
-
|
|
20
|
-
/// <reference lib="esnext.asynciterable" />
|
|
21
|
-
/** Interface representing a Suppressions. */
|
|
22
|
-
export interface Suppressions {
|
|
23
|
-
/**
|
|
24
|
-
* Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed
|
|
25
|
-
* attribute of a recommendation is referred to as a suppression.
|
|
26
|
-
* @param options The options parameters.
|
|
27
|
-
*/
|
|
28
|
-
list(
|
|
29
|
-
options?: SuppressionsListOptionalParams
|
|
30
|
-
): PagedAsyncIterableIterator<SuppressionContract>;
|
|
31
|
-
/**
|
|
32
|
-
* Obtains the details of a suppression.
|
|
33
|
-
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
34
|
-
* the recommendation applies.
|
|
35
|
-
* @param recommendationId The recommendation ID.
|
|
36
|
-
* @param name The name of the suppression.
|
|
37
|
-
* @param options The options parameters.
|
|
38
|
-
*/
|
|
39
|
-
get(
|
|
40
|
-
resourceUri: string,
|
|
41
|
-
recommendationId: string,
|
|
42
|
-
name: string,
|
|
43
|
-
options?: SuppressionsGetOptionalParams
|
|
44
|
-
): Promise<SuppressionsGetResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute
|
|
47
|
-
* is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of
|
|
48
|
-
* a recommendation.
|
|
49
|
-
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
50
|
-
* the recommendation applies.
|
|
51
|
-
* @param recommendationId The recommendation ID.
|
|
52
|
-
* @param name The name of the suppression.
|
|
53
|
-
* @param suppressionContract The snoozed or dismissed attribute; for example, the snooze duration.
|
|
54
|
-
* @param options The options parameters.
|
|
55
|
-
*/
|
|
56
|
-
create(
|
|
57
|
-
resourceUri: string,
|
|
58
|
-
recommendationId: string,
|
|
59
|
-
name: string,
|
|
60
|
-
suppressionContract: SuppressionContract,
|
|
61
|
-
options?: SuppressionsCreateOptionalParams
|
|
62
|
-
): Promise<SuppressionsCreateResponse>;
|
|
63
|
-
/**
|
|
64
|
-
* Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute
|
|
65
|
-
* of a recommendation is referred to as a suppression.
|
|
66
|
-
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
67
|
-
* the recommendation applies.
|
|
68
|
-
* @param recommendationId The recommendation ID.
|
|
69
|
-
* @param name The name of the suppression.
|
|
70
|
-
* @param options The options parameters.
|
|
71
|
-
*/
|
|
72
|
-
delete(
|
|
73
|
-
resourceUri: string,
|
|
74
|
-
recommendationId: string,
|
|
75
|
-
name: string,
|
|
76
|
-
options?: SuppressionsDeleteOptionalParams
|
|
77
|
-
): Promise<void>;
|
|
78
|
-
}
|
package/src/pagingHelper.ts
DELETED
|
@@ -1,39 +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
|
-
|
|
9
|
-
export interface PageInfo {
|
|
10
|
-
continuationToken?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const pageMap = new WeakMap<object, PageInfo>();
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Given the last `.value` produced by the `byPage` iterator,
|
|
17
|
-
* returns a continuation token that can be used to begin paging from
|
|
18
|
-
* that point later.
|
|
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
|
-
*/
|
|
22
|
-
export function getContinuationToken(page: unknown): string | undefined {
|
|
23
|
-
if (typeof page !== "object" || page === null) {
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
return pageMap.get(page)?.continuationToken;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function setContinuationToken(
|
|
30
|
-
page: unknown,
|
|
31
|
-
continuationToken: string | undefined
|
|
32
|
-
): void {
|
|
33
|
-
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const pageInfo = pageMap.get(page) ?? {};
|
|
37
|
-
pageInfo.continuationToken = continuationToken;
|
|
38
|
-
pageMap.set(page, pageInfo);
|
|
39
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "es6",
|
|
4
|
-
"moduleResolution": "node",
|
|
5
|
-
"strict": true,
|
|
6
|
-
"target": "es6",
|
|
7
|
-
"sourceMap": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"lib": [
|
|
13
|
-
"es6",
|
|
14
|
-
"dom"
|
|
15
|
-
],
|
|
16
|
-
"declaration": true,
|
|
17
|
-
"outDir": "./dist-esm",
|
|
18
|
-
"importHelpers": true,
|
|
19
|
-
"paths": {
|
|
20
|
-
"@azure/arm-advisor": [
|
|
21
|
-
"./src/index"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"include": [
|
|
26
|
-
"./src/**/*.ts",
|
|
27
|
-
"./test/**/*.ts",
|
|
28
|
-
"samples-dev/**/*.ts"
|
|
29
|
-
],
|
|
30
|
-
"exclude": [
|
|
31
|
-
"node_modules"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|