@azure/arm-advisor 2.1.1 → 3.0.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 +11 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +69 -81
- package/dist/index.js +1913 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/advisorManagementClient.d.ts +22 -0
- package/dist-esm/src/advisorManagementClient.d.ts.map +1 -0
- package/dist-esm/src/advisorManagementClient.js +55 -0
- package/dist-esm/src/advisorManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +457 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +55 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +21 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +315 -268
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +19 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.js +81 -61
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/configurations.d.ts +62 -0
- package/dist-esm/src/operations/configurations.d.ts.map +1 -0
- package/dist-esm/src/operations/configurations.js +260 -0
- package/dist-esm/src/operations/configurations.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +3 -5
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/recommendationMetadata.d.ts +38 -0
- package/dist-esm/src/operations/recommendationMetadata.d.ts.map +1 -0
- package/dist-esm/src/operations/recommendationMetadata.js +148 -0
- package/dist-esm/src/operations/recommendationMetadata.js.map +1 -0
- package/dist-esm/src/operations/recommendations.d.ts +57 -0
- package/dist-esm/src/operations/recommendations.d.ts.map +1 -0
- package/dist-esm/src/operations/recommendations.js +220 -0
- package/dist-esm/src/operations/recommendations.js.map +1 -0
- package/dist-esm/src/operations/suppressions.d.ts +65 -0
- package/dist-esm/src/operations/suppressions.d.ts.map +1 -0
- package/dist-esm/src/operations/suppressions.js +242 -0
- package/dist-esm/src/operations/suppressions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/configurations.d.ts +33 -0
- package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/configurations.js +9 -0
- package/dist-esm/src/operationsInterfaces/configurations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/recommendationMetadata.d.ts +17 -0
- package/dist-esm/src/operationsInterfaces/recommendationMetadata.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/recommendationMetadata.js +9 -0
- package/dist-esm/src/operationsInterfaces/recommendationMetadata.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/recommendations.d.ts +35 -0
- package/dist-esm/src/operationsInterfaces/recommendations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/recommendations.js +9 -0
- package/dist-esm/src/operationsInterfaces/recommendations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/suppressions.d.ts +43 -0
- package/dist-esm/src/operationsInterfaces/suppressions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/suppressions.js +9 -0
- package/dist-esm/src/operationsInterfaces/suppressions.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +4 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +43 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +63 -32
- package/review/arm-advisor.api.md +466 -0
- package/rollup.config.js +181 -30
- package/src/advisorManagementClient.ts +82 -43
- package/src/index.ts +12 -0
- package/src/models/index.ts +408 -691
- package/src/models/mappers.ts +324 -269
- package/src/models/parameters.ts +105 -62
- package/src/operations/configurations.ts +210 -202
- package/src/operations/index.ts +3 -5
- package/src/operations/operations.ts +89 -75
- package/src/operations/recommendationMetadata.ts +111 -114
- package/src/operations/recommendations.ts +172 -203
- package/src/operations/suppressions.ts +201 -239
- package/src/operationsInterfaces/configurations.ts +65 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/recommendationMetadata.ts +36 -0
- package/src/operationsInterfaces/recommendations.ts +63 -0
- package/src/operationsInterfaces/suppressions.ts +78 -0
- package/tsconfig.json +3 -3
- package/types/arm-advisor.d.ts +679 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-advisor.js +0 -1737
- package/dist/arm-advisor.js.map +0 -1
- package/dist/arm-advisor.min.js +0 -1
- package/dist/arm-advisor.min.js.map +0 -1
- package/esm/advisorManagementClient.d.ts +0 -28
- package/esm/advisorManagementClient.d.ts.map +0 -1
- package/esm/advisorManagementClient.js +0 -42
- package/esm/advisorManagementClient.js.map +0 -1
- package/esm/advisorManagementClientContext.d.ts +0 -22
- package/esm/advisorManagementClientContext.d.ts.map +0 -1
- package/esm/advisorManagementClientContext.js +0 -61
- package/esm/advisorManagementClientContext.js.map +0 -1
- package/esm/models/configurationsMappers.d.ts +0 -2
- package/esm/models/configurationsMappers.d.ts.map +0 -1
- package/esm/models/configurationsMappers.js +0 -9
- package/esm/models/configurationsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -746
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -8
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -23
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -15
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/recommendationMetadataMappers.d.ts +0 -2
- package/esm/models/recommendationMetadataMappers.d.ts.map +0 -1
- package/esm/models/recommendationMetadataMappers.js +0 -9
- package/esm/models/recommendationMetadataMappers.js.map +0 -1
- package/esm/models/recommendationsMappers.d.ts +0 -2
- package/esm/models/recommendationsMappers.d.ts.map +0 -1
- package/esm/models/recommendationsMappers.js +0 -9
- package/esm/models/recommendationsMappers.js.map +0 -1
- package/esm/models/suppressionsMappers.d.ts +0 -2
- package/esm/models/suppressionsMappers.d.ts.map +0 -1
- package/esm/models/suppressionsMappers.js +0 -9
- package/esm/models/suppressionsMappers.js.map +0 -1
- package/esm/operations/configurations.d.ts +0 -109
- package/esm/operations/configurations.d.ts.map +0 -1
- package/esm/operations/configurations.js +0 -178
- package/esm/operations/configurations.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -77
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/recommendationMetadata.d.ts +0 -64
- package/esm/operations/recommendationMetadata.d.ts.map +0 -1
- package/esm/operations/recommendationMetadata.js +0 -108
- package/esm/operations/recommendationMetadata.js.map +0 -1
- package/esm/operations/recommendations.d.ts +0 -112
- package/esm/operations/recommendations.d.ts.map +0 -1
- package/esm/operations/recommendations.js +0 -168
- package/esm/operations/recommendations.js.map +0 -1
- package/esm/operations/suppressions.d.ts +0 -135
- package/esm/operations/suppressions.d.ts.map +0 -1
- package/esm/operations/suppressions.js +0 -182
- package/esm/operations/suppressions.js.map +0 -1
- package/src/advisorManagementClientContext.ts +0 -68
- package/src/models/configurationsMappers.ts +0 -21
- package/src/models/operationsMappers.ts +0 -14
- package/src/models/recommendationMetadataMappers.ts +0 -15
- package/src/models/recommendationsMappers.ts +0 -21
- package/src/models/suppressionsMappers.ts +0 -20
package/dist/index.js
ADDED
|
@@ -0,0 +1,1913 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var coreClient = require('@azure/core-client');
|
|
6
|
+
var tslib = require('tslib');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Copyright (c) Microsoft Corporation.
|
|
10
|
+
* Licensed under the MIT License.
|
|
11
|
+
*
|
|
12
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
13
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
14
|
+
*/
|
|
15
|
+
(function (KnownScenario) {
|
|
16
|
+
KnownScenario["Alerts"] = "Alerts";
|
|
17
|
+
})(exports.KnownScenario || (exports.KnownScenario = {}));
|
|
18
|
+
(function (KnownCpuThreshold) {
|
|
19
|
+
KnownCpuThreshold["Five"] = "5";
|
|
20
|
+
KnownCpuThreshold["Ten"] = "10";
|
|
21
|
+
KnownCpuThreshold["Fifteen"] = "15";
|
|
22
|
+
KnownCpuThreshold["Twenty"] = "20";
|
|
23
|
+
})(exports.KnownCpuThreshold || (exports.KnownCpuThreshold = {}));
|
|
24
|
+
(function (KnownCategory) {
|
|
25
|
+
KnownCategory["HighAvailability"] = "HighAvailability";
|
|
26
|
+
KnownCategory["Security"] = "Security";
|
|
27
|
+
KnownCategory["Performance"] = "Performance";
|
|
28
|
+
KnownCategory["Cost"] = "Cost";
|
|
29
|
+
KnownCategory["OperationalExcellence"] = "OperationalExcellence";
|
|
30
|
+
})(exports.KnownCategory || (exports.KnownCategory = {}));
|
|
31
|
+
(function (KnownDigestConfigState) {
|
|
32
|
+
KnownDigestConfigState["Active"] = "Active";
|
|
33
|
+
KnownDigestConfigState["Disabled"] = "Disabled";
|
|
34
|
+
})(exports.KnownDigestConfigState || (exports.KnownDigestConfigState = {}));
|
|
35
|
+
(function (KnownConfigurationName) {
|
|
36
|
+
KnownConfigurationName["Default"] = "default";
|
|
37
|
+
})(exports.KnownConfigurationName || (exports.KnownConfigurationName = {}));
|
|
38
|
+
(function (KnownImpact) {
|
|
39
|
+
KnownImpact["High"] = "High";
|
|
40
|
+
KnownImpact["Medium"] = "Medium";
|
|
41
|
+
KnownImpact["Low"] = "Low";
|
|
42
|
+
})(exports.KnownImpact || (exports.KnownImpact = {}));
|
|
43
|
+
(function (KnownRisk) {
|
|
44
|
+
KnownRisk["Error"] = "Error";
|
|
45
|
+
KnownRisk["Warning"] = "Warning";
|
|
46
|
+
KnownRisk["None"] = "None";
|
|
47
|
+
})(exports.KnownRisk || (exports.KnownRisk = {}));
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* Copyright (c) Microsoft Corporation.
|
|
51
|
+
* Licensed under the MIT License.
|
|
52
|
+
*
|
|
53
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
54
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
55
|
+
*/
|
|
56
|
+
const MetadataEntity = {
|
|
57
|
+
type: {
|
|
58
|
+
name: "Composite",
|
|
59
|
+
className: "MetadataEntity",
|
|
60
|
+
modelProperties: {
|
|
61
|
+
id: {
|
|
62
|
+
serializedName: "id",
|
|
63
|
+
type: {
|
|
64
|
+
name: "String"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
type: {
|
|
68
|
+
serializedName: "type",
|
|
69
|
+
type: {
|
|
70
|
+
name: "String"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
name: {
|
|
74
|
+
serializedName: "name",
|
|
75
|
+
type: {
|
|
76
|
+
name: "String"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
displayName: {
|
|
80
|
+
serializedName: "properties.displayName",
|
|
81
|
+
type: {
|
|
82
|
+
name: "String"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
dependsOn: {
|
|
86
|
+
serializedName: "properties.dependsOn",
|
|
87
|
+
type: {
|
|
88
|
+
name: "Sequence",
|
|
89
|
+
element: {
|
|
90
|
+
type: {
|
|
91
|
+
name: "String"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
applicableScenarios: {
|
|
97
|
+
serializedName: "properties.applicableScenarios",
|
|
98
|
+
type: {
|
|
99
|
+
name: "Sequence",
|
|
100
|
+
element: {
|
|
101
|
+
type: {
|
|
102
|
+
name: "String"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
supportedValues: {
|
|
108
|
+
serializedName: "properties.supportedValues",
|
|
109
|
+
type: {
|
|
110
|
+
name: "Sequence",
|
|
111
|
+
element: {
|
|
112
|
+
type: {
|
|
113
|
+
name: "Composite",
|
|
114
|
+
className: "MetadataSupportedValueDetail"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const MetadataSupportedValueDetail = {
|
|
123
|
+
type: {
|
|
124
|
+
name: "Composite",
|
|
125
|
+
className: "MetadataSupportedValueDetail",
|
|
126
|
+
modelProperties: {
|
|
127
|
+
id: {
|
|
128
|
+
serializedName: "id",
|
|
129
|
+
type: {
|
|
130
|
+
name: "String"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
displayName: {
|
|
134
|
+
serializedName: "displayName",
|
|
135
|
+
type: {
|
|
136
|
+
name: "String"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
const ARMErrorResponseBody = {
|
|
143
|
+
type: {
|
|
144
|
+
name: "Composite",
|
|
145
|
+
className: "ARMErrorResponseBody",
|
|
146
|
+
modelProperties: {
|
|
147
|
+
message: {
|
|
148
|
+
serializedName: "message",
|
|
149
|
+
type: {
|
|
150
|
+
name: "String"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
code: {
|
|
154
|
+
serializedName: "code",
|
|
155
|
+
type: {
|
|
156
|
+
name: "String"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
const ArmErrorResponse = {
|
|
163
|
+
type: {
|
|
164
|
+
name: "Composite",
|
|
165
|
+
className: "ArmErrorResponse",
|
|
166
|
+
modelProperties: {
|
|
167
|
+
error: {
|
|
168
|
+
serializedName: "error",
|
|
169
|
+
type: {
|
|
170
|
+
name: "Composite",
|
|
171
|
+
className: "ARMErrorResponseBody"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const MetadataEntityListResult = {
|
|
178
|
+
type: {
|
|
179
|
+
name: "Composite",
|
|
180
|
+
className: "MetadataEntityListResult",
|
|
181
|
+
modelProperties: {
|
|
182
|
+
value: {
|
|
183
|
+
serializedName: "value",
|
|
184
|
+
type: {
|
|
185
|
+
name: "Sequence",
|
|
186
|
+
element: {
|
|
187
|
+
type: {
|
|
188
|
+
name: "Composite",
|
|
189
|
+
className: "MetadataEntity"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
nextLink: {
|
|
195
|
+
serializedName: "nextLink",
|
|
196
|
+
type: {
|
|
197
|
+
name: "String"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
const ConfigurationListResult = {
|
|
204
|
+
type: {
|
|
205
|
+
name: "Composite",
|
|
206
|
+
className: "ConfigurationListResult",
|
|
207
|
+
modelProperties: {
|
|
208
|
+
value: {
|
|
209
|
+
serializedName: "value",
|
|
210
|
+
type: {
|
|
211
|
+
name: "Sequence",
|
|
212
|
+
element: {
|
|
213
|
+
type: {
|
|
214
|
+
name: "Composite",
|
|
215
|
+
className: "ConfigData"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
nextLink: {
|
|
221
|
+
serializedName: "nextLink",
|
|
222
|
+
type: {
|
|
223
|
+
name: "String"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
const DigestConfig = {
|
|
230
|
+
type: {
|
|
231
|
+
name: "Composite",
|
|
232
|
+
className: "DigestConfig",
|
|
233
|
+
modelProperties: {
|
|
234
|
+
name: {
|
|
235
|
+
serializedName: "name",
|
|
236
|
+
type: {
|
|
237
|
+
name: "String"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
actionGroupResourceId: {
|
|
241
|
+
serializedName: "actionGroupResourceId",
|
|
242
|
+
type: {
|
|
243
|
+
name: "String"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
frequency: {
|
|
247
|
+
serializedName: "frequency",
|
|
248
|
+
type: {
|
|
249
|
+
name: "Number"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
categories: {
|
|
253
|
+
serializedName: "categories",
|
|
254
|
+
type: {
|
|
255
|
+
name: "Sequence",
|
|
256
|
+
element: {
|
|
257
|
+
type: {
|
|
258
|
+
name: "String"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
language: {
|
|
264
|
+
serializedName: "language",
|
|
265
|
+
type: {
|
|
266
|
+
name: "String"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
state: {
|
|
270
|
+
serializedName: "state",
|
|
271
|
+
type: {
|
|
272
|
+
name: "String"
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
const Resource = {
|
|
279
|
+
type: {
|
|
280
|
+
name: "Composite",
|
|
281
|
+
className: "Resource",
|
|
282
|
+
modelProperties: {
|
|
283
|
+
id: {
|
|
284
|
+
serializedName: "id",
|
|
285
|
+
readOnly: true,
|
|
286
|
+
type: {
|
|
287
|
+
name: "String"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
name: {
|
|
291
|
+
serializedName: "name",
|
|
292
|
+
readOnly: true,
|
|
293
|
+
type: {
|
|
294
|
+
name: "String"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
type: {
|
|
298
|
+
serializedName: "type",
|
|
299
|
+
readOnly: true,
|
|
300
|
+
type: {
|
|
301
|
+
name: "String"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
const ResourceRecommendationBaseListResult = {
|
|
308
|
+
type: {
|
|
309
|
+
name: "Composite",
|
|
310
|
+
className: "ResourceRecommendationBaseListResult",
|
|
311
|
+
modelProperties: {
|
|
312
|
+
nextLink: {
|
|
313
|
+
serializedName: "nextLink",
|
|
314
|
+
type: {
|
|
315
|
+
name: "String"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
value: {
|
|
319
|
+
serializedName: "value",
|
|
320
|
+
type: {
|
|
321
|
+
name: "Sequence",
|
|
322
|
+
element: {
|
|
323
|
+
type: {
|
|
324
|
+
name: "Composite",
|
|
325
|
+
className: "ResourceRecommendationBase"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
const ShortDescription = {
|
|
334
|
+
type: {
|
|
335
|
+
name: "Composite",
|
|
336
|
+
className: "ShortDescription",
|
|
337
|
+
modelProperties: {
|
|
338
|
+
problem: {
|
|
339
|
+
serializedName: "problem",
|
|
340
|
+
type: {
|
|
341
|
+
name: "String"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
solution: {
|
|
345
|
+
serializedName: "solution",
|
|
346
|
+
type: {
|
|
347
|
+
name: "String"
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
const ResourceMetadata = {
|
|
354
|
+
type: {
|
|
355
|
+
name: "Composite",
|
|
356
|
+
className: "ResourceMetadata",
|
|
357
|
+
modelProperties: {
|
|
358
|
+
resourceId: {
|
|
359
|
+
serializedName: "resourceId",
|
|
360
|
+
type: {
|
|
361
|
+
name: "String"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
source: {
|
|
365
|
+
serializedName: "source",
|
|
366
|
+
type: {
|
|
367
|
+
name: "String"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
action: {
|
|
371
|
+
serializedName: "action",
|
|
372
|
+
type: {
|
|
373
|
+
name: "Dictionary",
|
|
374
|
+
value: {
|
|
375
|
+
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
singular: {
|
|
380
|
+
serializedName: "singular",
|
|
381
|
+
type: {
|
|
382
|
+
name: "String"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
plural: {
|
|
386
|
+
serializedName: "plural",
|
|
387
|
+
type: {
|
|
388
|
+
name: "String"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
const OperationEntityListResult = {
|
|
395
|
+
type: {
|
|
396
|
+
name: "Composite",
|
|
397
|
+
className: "OperationEntityListResult",
|
|
398
|
+
modelProperties: {
|
|
399
|
+
nextLink: {
|
|
400
|
+
serializedName: "nextLink",
|
|
401
|
+
type: {
|
|
402
|
+
name: "String"
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
value: {
|
|
406
|
+
serializedName: "value",
|
|
407
|
+
type: {
|
|
408
|
+
name: "Sequence",
|
|
409
|
+
element: {
|
|
410
|
+
type: {
|
|
411
|
+
name: "Composite",
|
|
412
|
+
className: "OperationEntity"
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
const OperationEntity = {
|
|
421
|
+
type: {
|
|
422
|
+
name: "Composite",
|
|
423
|
+
className: "OperationEntity",
|
|
424
|
+
modelProperties: {
|
|
425
|
+
name: {
|
|
426
|
+
serializedName: "name",
|
|
427
|
+
type: {
|
|
428
|
+
name: "String"
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
display: {
|
|
432
|
+
serializedName: "display",
|
|
433
|
+
type: {
|
|
434
|
+
name: "Composite",
|
|
435
|
+
className: "OperationDisplayInfo"
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
const OperationDisplayInfo = {
|
|
442
|
+
type: {
|
|
443
|
+
name: "Composite",
|
|
444
|
+
className: "OperationDisplayInfo",
|
|
445
|
+
modelProperties: {
|
|
446
|
+
description: {
|
|
447
|
+
serializedName: "description",
|
|
448
|
+
type: {
|
|
449
|
+
name: "String"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
operation: {
|
|
453
|
+
serializedName: "operation",
|
|
454
|
+
type: {
|
|
455
|
+
name: "String"
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
provider: {
|
|
459
|
+
serializedName: "provider",
|
|
460
|
+
type: {
|
|
461
|
+
name: "String"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
resource: {
|
|
465
|
+
serializedName: "resource",
|
|
466
|
+
type: {
|
|
467
|
+
name: "String"
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
const SuppressionContractListResult = {
|
|
474
|
+
type: {
|
|
475
|
+
name: "Composite",
|
|
476
|
+
className: "SuppressionContractListResult",
|
|
477
|
+
modelProperties: {
|
|
478
|
+
nextLink: {
|
|
479
|
+
serializedName: "nextLink",
|
|
480
|
+
type: {
|
|
481
|
+
name: "String"
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
value: {
|
|
485
|
+
serializedName: "value",
|
|
486
|
+
type: {
|
|
487
|
+
name: "Sequence",
|
|
488
|
+
element: {
|
|
489
|
+
type: {
|
|
490
|
+
name: "Composite",
|
|
491
|
+
className: "SuppressionContract"
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
const ConfigData = {
|
|
500
|
+
type: {
|
|
501
|
+
name: "Composite",
|
|
502
|
+
className: "ConfigData",
|
|
503
|
+
modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { exclude: {
|
|
504
|
+
serializedName: "properties.exclude",
|
|
505
|
+
type: {
|
|
506
|
+
name: "Boolean"
|
|
507
|
+
}
|
|
508
|
+
}, lowCpuThreshold: {
|
|
509
|
+
serializedName: "properties.lowCpuThreshold",
|
|
510
|
+
type: {
|
|
511
|
+
name: "String"
|
|
512
|
+
}
|
|
513
|
+
}, digests: {
|
|
514
|
+
serializedName: "properties.digests",
|
|
515
|
+
type: {
|
|
516
|
+
name: "Sequence",
|
|
517
|
+
element: {
|
|
518
|
+
type: {
|
|
519
|
+
name: "Composite",
|
|
520
|
+
className: "DigestConfig"
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
} })
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
const ResourceRecommendationBase = {
|
|
528
|
+
type: {
|
|
529
|
+
name: "Composite",
|
|
530
|
+
className: "ResourceRecommendationBase",
|
|
531
|
+
modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { category: {
|
|
532
|
+
serializedName: "properties.category",
|
|
533
|
+
type: {
|
|
534
|
+
name: "String"
|
|
535
|
+
}
|
|
536
|
+
}, impact: {
|
|
537
|
+
serializedName: "properties.impact",
|
|
538
|
+
type: {
|
|
539
|
+
name: "String"
|
|
540
|
+
}
|
|
541
|
+
}, impactedField: {
|
|
542
|
+
serializedName: "properties.impactedField",
|
|
543
|
+
type: {
|
|
544
|
+
name: "String"
|
|
545
|
+
}
|
|
546
|
+
}, impactedValue: {
|
|
547
|
+
serializedName: "properties.impactedValue",
|
|
548
|
+
type: {
|
|
549
|
+
name: "String"
|
|
550
|
+
}
|
|
551
|
+
}, lastUpdated: {
|
|
552
|
+
serializedName: "properties.lastUpdated",
|
|
553
|
+
type: {
|
|
554
|
+
name: "DateTime"
|
|
555
|
+
}
|
|
556
|
+
}, metadata: {
|
|
557
|
+
serializedName: "properties.metadata",
|
|
558
|
+
type: {
|
|
559
|
+
name: "Dictionary",
|
|
560
|
+
value: {
|
|
561
|
+
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}, recommendationTypeId: {
|
|
565
|
+
serializedName: "properties.recommendationTypeId",
|
|
566
|
+
type: {
|
|
567
|
+
name: "String"
|
|
568
|
+
}
|
|
569
|
+
}, risk: {
|
|
570
|
+
serializedName: "properties.risk",
|
|
571
|
+
type: {
|
|
572
|
+
name: "String"
|
|
573
|
+
}
|
|
574
|
+
}, shortDescription: {
|
|
575
|
+
serializedName: "properties.shortDescription",
|
|
576
|
+
type: {
|
|
577
|
+
name: "Composite",
|
|
578
|
+
className: "ShortDescription"
|
|
579
|
+
}
|
|
580
|
+
}, suppressionIds: {
|
|
581
|
+
serializedName: "properties.suppressionIds",
|
|
582
|
+
type: {
|
|
583
|
+
name: "Sequence",
|
|
584
|
+
element: {
|
|
585
|
+
type: {
|
|
586
|
+
name: "Uuid"
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}, extendedProperties: {
|
|
591
|
+
serializedName: "properties.extendedProperties",
|
|
592
|
+
type: {
|
|
593
|
+
name: "Dictionary",
|
|
594
|
+
value: { type: { name: "String" } }
|
|
595
|
+
}
|
|
596
|
+
}, resourceMetadata: {
|
|
597
|
+
serializedName: "properties.resourceMetadata",
|
|
598
|
+
type: {
|
|
599
|
+
name: "Composite",
|
|
600
|
+
className: "ResourceMetadata"
|
|
601
|
+
}
|
|
602
|
+
}, description: {
|
|
603
|
+
serializedName: "properties.description",
|
|
604
|
+
type: {
|
|
605
|
+
name: "String"
|
|
606
|
+
}
|
|
607
|
+
}, label: {
|
|
608
|
+
serializedName: "properties.label",
|
|
609
|
+
type: {
|
|
610
|
+
name: "String"
|
|
611
|
+
}
|
|
612
|
+
}, learnMoreLink: {
|
|
613
|
+
serializedName: "properties.learnMoreLink",
|
|
614
|
+
type: {
|
|
615
|
+
name: "String"
|
|
616
|
+
}
|
|
617
|
+
}, potentialBenefits: {
|
|
618
|
+
serializedName: "properties.potentialBenefits",
|
|
619
|
+
type: {
|
|
620
|
+
name: "String"
|
|
621
|
+
}
|
|
622
|
+
}, actions: {
|
|
623
|
+
serializedName: "properties.actions",
|
|
624
|
+
type: {
|
|
625
|
+
name: "Sequence",
|
|
626
|
+
element: {
|
|
627
|
+
type: {
|
|
628
|
+
name: "Dictionary",
|
|
629
|
+
value: {
|
|
630
|
+
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}, remediation: {
|
|
636
|
+
serializedName: "properties.remediation",
|
|
637
|
+
type: {
|
|
638
|
+
name: "Dictionary",
|
|
639
|
+
value: {
|
|
640
|
+
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}, exposedMetadataProperties: {
|
|
644
|
+
serializedName: "properties.exposedMetadataProperties",
|
|
645
|
+
type: {
|
|
646
|
+
name: "Dictionary",
|
|
647
|
+
value: {
|
|
648
|
+
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
} })
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
const SuppressionContract = {
|
|
655
|
+
type: {
|
|
656
|
+
name: "Composite",
|
|
657
|
+
className: "SuppressionContract",
|
|
658
|
+
modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { suppressionId: {
|
|
659
|
+
serializedName: "properties.suppressionId",
|
|
660
|
+
type: {
|
|
661
|
+
name: "String"
|
|
662
|
+
}
|
|
663
|
+
}, ttl: {
|
|
664
|
+
serializedName: "properties.ttl",
|
|
665
|
+
type: {
|
|
666
|
+
name: "String"
|
|
667
|
+
}
|
|
668
|
+
}, expirationTimeStamp: {
|
|
669
|
+
serializedName: "properties.expirationTimeStamp",
|
|
670
|
+
readOnly: true,
|
|
671
|
+
type: {
|
|
672
|
+
name: "DateTime"
|
|
673
|
+
}
|
|
674
|
+
} })
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
const RecommendationsGenerateHeaders = {
|
|
678
|
+
type: {
|
|
679
|
+
name: "Composite",
|
|
680
|
+
className: "RecommendationsGenerateHeaders",
|
|
681
|
+
modelProperties: {
|
|
682
|
+
location: {
|
|
683
|
+
serializedName: "location",
|
|
684
|
+
type: {
|
|
685
|
+
name: "String"
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
retryAfter: {
|
|
689
|
+
serializedName: "retry-after",
|
|
690
|
+
type: {
|
|
691
|
+
name: "String"
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
|
699
|
+
__proto__: null,
|
|
700
|
+
MetadataEntity: MetadataEntity,
|
|
701
|
+
MetadataSupportedValueDetail: MetadataSupportedValueDetail,
|
|
702
|
+
ARMErrorResponseBody: ARMErrorResponseBody,
|
|
703
|
+
ArmErrorResponse: ArmErrorResponse,
|
|
704
|
+
MetadataEntityListResult: MetadataEntityListResult,
|
|
705
|
+
ConfigurationListResult: ConfigurationListResult,
|
|
706
|
+
DigestConfig: DigestConfig,
|
|
707
|
+
Resource: Resource,
|
|
708
|
+
ResourceRecommendationBaseListResult: ResourceRecommendationBaseListResult,
|
|
709
|
+
ShortDescription: ShortDescription,
|
|
710
|
+
ResourceMetadata: ResourceMetadata,
|
|
711
|
+
OperationEntityListResult: OperationEntityListResult,
|
|
712
|
+
OperationEntity: OperationEntity,
|
|
713
|
+
OperationDisplayInfo: OperationDisplayInfo,
|
|
714
|
+
SuppressionContractListResult: SuppressionContractListResult,
|
|
715
|
+
ConfigData: ConfigData,
|
|
716
|
+
ResourceRecommendationBase: ResourceRecommendationBase,
|
|
717
|
+
SuppressionContract: SuppressionContract,
|
|
718
|
+
RecommendationsGenerateHeaders: RecommendationsGenerateHeaders
|
|
719
|
+
});
|
|
720
|
+
|
|
721
|
+
/*
|
|
722
|
+
* Copyright (c) Microsoft Corporation.
|
|
723
|
+
* Licensed under the MIT License.
|
|
724
|
+
*
|
|
725
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
726
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
727
|
+
*/
|
|
728
|
+
const accept = {
|
|
729
|
+
parameterPath: "accept",
|
|
730
|
+
mapper: {
|
|
731
|
+
defaultValue: "application/json",
|
|
732
|
+
isConstant: true,
|
|
733
|
+
serializedName: "Accept",
|
|
734
|
+
type: {
|
|
735
|
+
name: "String"
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
const $host = {
|
|
740
|
+
parameterPath: "$host",
|
|
741
|
+
mapper: {
|
|
742
|
+
serializedName: "$host",
|
|
743
|
+
required: true,
|
|
744
|
+
type: {
|
|
745
|
+
name: "String"
|
|
746
|
+
}
|
|
747
|
+
},
|
|
748
|
+
skipEncoding: true
|
|
749
|
+
};
|
|
750
|
+
const name = {
|
|
751
|
+
parameterPath: "name",
|
|
752
|
+
mapper: {
|
|
753
|
+
serializedName: "name",
|
|
754
|
+
required: true,
|
|
755
|
+
type: {
|
|
756
|
+
name: "String"
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
const apiVersion = {
|
|
761
|
+
parameterPath: "apiVersion",
|
|
762
|
+
mapper: {
|
|
763
|
+
defaultValue: "2020-01-01",
|
|
764
|
+
isConstant: true,
|
|
765
|
+
serializedName: "api-version",
|
|
766
|
+
type: {
|
|
767
|
+
name: "String"
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
const nextLink = {
|
|
772
|
+
parameterPath: "nextLink",
|
|
773
|
+
mapper: {
|
|
774
|
+
serializedName: "nextLink",
|
|
775
|
+
required: true,
|
|
776
|
+
type: {
|
|
777
|
+
name: "String"
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
skipEncoding: true
|
|
781
|
+
};
|
|
782
|
+
const subscriptionId = {
|
|
783
|
+
parameterPath: "subscriptionId",
|
|
784
|
+
mapper: {
|
|
785
|
+
serializedName: "subscriptionId",
|
|
786
|
+
required: true,
|
|
787
|
+
type: {
|
|
788
|
+
name: "String"
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
const contentType = {
|
|
793
|
+
parameterPath: ["options", "contentType"],
|
|
794
|
+
mapper: {
|
|
795
|
+
defaultValue: "application/json",
|
|
796
|
+
isConstant: true,
|
|
797
|
+
serializedName: "Content-Type",
|
|
798
|
+
type: {
|
|
799
|
+
name: "String"
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
const configContract = {
|
|
804
|
+
parameterPath: "configContract",
|
|
805
|
+
mapper: ConfigData
|
|
806
|
+
};
|
|
807
|
+
const configurationName = {
|
|
808
|
+
parameterPath: "configurationName",
|
|
809
|
+
mapper: {
|
|
810
|
+
serializedName: "configurationName",
|
|
811
|
+
required: true,
|
|
812
|
+
type: {
|
|
813
|
+
name: "String"
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
const resourceGroup = {
|
|
818
|
+
parameterPath: "resourceGroup",
|
|
819
|
+
mapper: {
|
|
820
|
+
serializedName: "resourceGroup",
|
|
821
|
+
required: true,
|
|
822
|
+
type: {
|
|
823
|
+
name: "String"
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
};
|
|
827
|
+
const operationId = {
|
|
828
|
+
parameterPath: "operationId",
|
|
829
|
+
mapper: {
|
|
830
|
+
serializedName: "operationId",
|
|
831
|
+
required: true,
|
|
832
|
+
type: {
|
|
833
|
+
name: "Uuid"
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
const filter = {
|
|
838
|
+
parameterPath: ["options", "filter"],
|
|
839
|
+
mapper: {
|
|
840
|
+
serializedName: "$filter",
|
|
841
|
+
type: {
|
|
842
|
+
name: "String"
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
};
|
|
846
|
+
const top = {
|
|
847
|
+
parameterPath: ["options", "top"],
|
|
848
|
+
mapper: {
|
|
849
|
+
serializedName: "$top",
|
|
850
|
+
type: {
|
|
851
|
+
name: "Number"
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
const skipToken = {
|
|
856
|
+
parameterPath: ["options", "skipToken"],
|
|
857
|
+
mapper: {
|
|
858
|
+
serializedName: "$skipToken",
|
|
859
|
+
type: {
|
|
860
|
+
name: "String"
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
const resourceUri = {
|
|
865
|
+
parameterPath: "resourceUri",
|
|
866
|
+
mapper: {
|
|
867
|
+
serializedName: "resourceUri",
|
|
868
|
+
required: true,
|
|
869
|
+
type: {
|
|
870
|
+
name: "String"
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
const recommendationId = {
|
|
875
|
+
parameterPath: "recommendationId",
|
|
876
|
+
mapper: {
|
|
877
|
+
serializedName: "recommendationId",
|
|
878
|
+
required: true,
|
|
879
|
+
type: {
|
|
880
|
+
name: "String"
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
const suppressionContract = {
|
|
885
|
+
parameterPath: "suppressionContract",
|
|
886
|
+
mapper: SuppressionContract
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
/*
|
|
890
|
+
* Copyright (c) Microsoft Corporation.
|
|
891
|
+
* Licensed under the MIT License.
|
|
892
|
+
*
|
|
893
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
894
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
895
|
+
*/
|
|
896
|
+
/// <reference lib="esnext.asynciterable" />
|
|
897
|
+
/** Class containing RecommendationMetadata operations. */
|
|
898
|
+
class RecommendationMetadataImpl {
|
|
899
|
+
/**
|
|
900
|
+
* Initialize a new instance of the class RecommendationMetadata class.
|
|
901
|
+
* @param client Reference to the service client
|
|
902
|
+
*/
|
|
903
|
+
constructor(client) {
|
|
904
|
+
this.client = client;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Gets the list of metadata entities.
|
|
908
|
+
* @param options The options parameters.
|
|
909
|
+
*/
|
|
910
|
+
list(options) {
|
|
911
|
+
const iter = this.listPagingAll(options);
|
|
912
|
+
return {
|
|
913
|
+
next() {
|
|
914
|
+
return iter.next();
|
|
915
|
+
},
|
|
916
|
+
[Symbol.asyncIterator]() {
|
|
917
|
+
return this;
|
|
918
|
+
},
|
|
919
|
+
byPage: () => {
|
|
920
|
+
return this.listPagingPage(options);
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
listPagingPage(options) {
|
|
925
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
926
|
+
let result = yield tslib.__await(this._list(options));
|
|
927
|
+
yield yield tslib.__await(result.value || []);
|
|
928
|
+
let continuationToken = result.nextLink;
|
|
929
|
+
while (continuationToken) {
|
|
930
|
+
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
931
|
+
continuationToken = result.nextLink;
|
|
932
|
+
yield yield tslib.__await(result.value || []);
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
listPagingAll(options) {
|
|
937
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
938
|
+
var e_1, _a;
|
|
939
|
+
try {
|
|
940
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
941
|
+
const page = _c.value;
|
|
942
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
946
|
+
finally {
|
|
947
|
+
try {
|
|
948
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
949
|
+
}
|
|
950
|
+
finally { if (e_1) throw e_1.error; }
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Gets the metadata entity.
|
|
956
|
+
* @param name Name of metadata entity.
|
|
957
|
+
* @param options The options parameters.
|
|
958
|
+
*/
|
|
959
|
+
get(name, options) {
|
|
960
|
+
return this.client.sendOperationRequest({ name, options }, getOperationSpec);
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Gets the list of metadata entities.
|
|
964
|
+
* @param options The options parameters.
|
|
965
|
+
*/
|
|
966
|
+
_list(options) {
|
|
967
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* ListNext
|
|
971
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
972
|
+
* @param options The options parameters.
|
|
973
|
+
*/
|
|
974
|
+
_listNext(nextLink, options) {
|
|
975
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
// Operation Specifications
|
|
979
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
980
|
+
const getOperationSpec = {
|
|
981
|
+
path: "/providers/Microsoft.Advisor/metadata/{name}",
|
|
982
|
+
httpMethod: "GET",
|
|
983
|
+
responses: {
|
|
984
|
+
200: {
|
|
985
|
+
bodyMapper: MetadataEntity
|
|
986
|
+
},
|
|
987
|
+
404: {
|
|
988
|
+
bodyMapper: ARMErrorResponseBody,
|
|
989
|
+
isError: true
|
|
990
|
+
},
|
|
991
|
+
default: {
|
|
992
|
+
bodyMapper: ArmErrorResponse
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
queryParameters: [apiVersion],
|
|
996
|
+
urlParameters: [$host, name],
|
|
997
|
+
headerParameters: [accept],
|
|
998
|
+
serializer
|
|
999
|
+
};
|
|
1000
|
+
const listOperationSpec = {
|
|
1001
|
+
path: "/providers/Microsoft.Advisor/metadata",
|
|
1002
|
+
httpMethod: "GET",
|
|
1003
|
+
responses: {
|
|
1004
|
+
200: {
|
|
1005
|
+
bodyMapper: MetadataEntityListResult
|
|
1006
|
+
},
|
|
1007
|
+
default: {
|
|
1008
|
+
bodyMapper: ArmErrorResponse
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
queryParameters: [apiVersion],
|
|
1012
|
+
urlParameters: [$host],
|
|
1013
|
+
headerParameters: [accept],
|
|
1014
|
+
serializer
|
|
1015
|
+
};
|
|
1016
|
+
const listNextOperationSpec = {
|
|
1017
|
+
path: "{nextLink}",
|
|
1018
|
+
httpMethod: "GET",
|
|
1019
|
+
responses: {
|
|
1020
|
+
200: {
|
|
1021
|
+
bodyMapper: MetadataEntityListResult
|
|
1022
|
+
},
|
|
1023
|
+
default: {
|
|
1024
|
+
bodyMapper: ArmErrorResponse
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
1027
|
+
queryParameters: [apiVersion],
|
|
1028
|
+
urlParameters: [$host, nextLink],
|
|
1029
|
+
headerParameters: [accept],
|
|
1030
|
+
serializer
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
/*
|
|
1034
|
+
* Copyright (c) Microsoft Corporation.
|
|
1035
|
+
* Licensed under the MIT License.
|
|
1036
|
+
*
|
|
1037
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1038
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1039
|
+
*/
|
|
1040
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1041
|
+
/** Class containing Configurations operations. */
|
|
1042
|
+
class ConfigurationsImpl {
|
|
1043
|
+
/**
|
|
1044
|
+
* Initialize a new instance of the class Configurations class.
|
|
1045
|
+
* @param client Reference to the service client
|
|
1046
|
+
*/
|
|
1047
|
+
constructor(client) {
|
|
1048
|
+
this.client = client;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
|
|
1052
|
+
* @param options The options parameters.
|
|
1053
|
+
*/
|
|
1054
|
+
listBySubscription(options) {
|
|
1055
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
|
1056
|
+
return {
|
|
1057
|
+
next() {
|
|
1058
|
+
return iter.next();
|
|
1059
|
+
},
|
|
1060
|
+
[Symbol.asyncIterator]() {
|
|
1061
|
+
return this;
|
|
1062
|
+
},
|
|
1063
|
+
byPage: () => {
|
|
1064
|
+
return this.listBySubscriptionPagingPage(options);
|
|
1065
|
+
}
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
listBySubscriptionPagingPage(options) {
|
|
1069
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
|
1070
|
+
let result = yield tslib.__await(this._listBySubscription(options));
|
|
1071
|
+
yield yield tslib.__await(result.value || []);
|
|
1072
|
+
let continuationToken = result.nextLink;
|
|
1073
|
+
while (continuationToken) {
|
|
1074
|
+
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
|
1075
|
+
continuationToken = result.nextLink;
|
|
1076
|
+
yield yield tslib.__await(result.value || []);
|
|
1077
|
+
}
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
listBySubscriptionPagingAll(options) {
|
|
1081
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
|
|
1082
|
+
var e_1, _a;
|
|
1083
|
+
try {
|
|
1084
|
+
for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1085
|
+
const page = _c.value;
|
|
1086
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1090
|
+
finally {
|
|
1091
|
+
try {
|
|
1092
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1093
|
+
}
|
|
1094
|
+
finally { if (e_1) throw e_1.error; }
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Retrieve Azure Advisor configurations.
|
|
1100
|
+
* @param resourceGroup The name of the Azure resource group.
|
|
1101
|
+
* @param options The options parameters.
|
|
1102
|
+
*/
|
|
1103
|
+
listByResourceGroup(resourceGroup, options) {
|
|
1104
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroup, options);
|
|
1105
|
+
return {
|
|
1106
|
+
next() {
|
|
1107
|
+
return iter.next();
|
|
1108
|
+
},
|
|
1109
|
+
[Symbol.asyncIterator]() {
|
|
1110
|
+
return this;
|
|
1111
|
+
},
|
|
1112
|
+
byPage: () => {
|
|
1113
|
+
return this.listByResourceGroupPagingPage(resourceGroup, options);
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
}
|
|
1117
|
+
listByResourceGroupPagingPage(resourceGroup, options) {
|
|
1118
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
1119
|
+
let result = yield tslib.__await(this._listByResourceGroup(resourceGroup, options));
|
|
1120
|
+
yield yield tslib.__await(result.value || []);
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
listByResourceGroupPagingAll(resourceGroup, options) {
|
|
1124
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
|
1125
|
+
var e_2, _a;
|
|
1126
|
+
try {
|
|
1127
|
+
for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroup, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1128
|
+
const page = _c.value;
|
|
1129
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1133
|
+
finally {
|
|
1134
|
+
try {
|
|
1135
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1136
|
+
}
|
|
1137
|
+
finally { if (e_2) throw e_2.error; }
|
|
1138
|
+
}
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
|
|
1143
|
+
* @param options The options parameters.
|
|
1144
|
+
*/
|
|
1145
|
+
_listBySubscription(options) {
|
|
1146
|
+
return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Create/Overwrite Azure Advisor configuration and also delete all configurations of contained
|
|
1150
|
+
* resource groups.
|
|
1151
|
+
* @param configurationName Advisor configuration name. Value must be 'default'
|
|
1152
|
+
* @param configContract The Azure Advisor configuration data structure.
|
|
1153
|
+
* @param options The options parameters.
|
|
1154
|
+
*/
|
|
1155
|
+
createInSubscription(configurationName, configContract, options) {
|
|
1156
|
+
return this.client.sendOperationRequest({ configurationName, configContract, options }, createInSubscriptionOperationSpec);
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* Retrieve Azure Advisor configurations.
|
|
1160
|
+
* @param resourceGroup The name of the Azure resource group.
|
|
1161
|
+
* @param options The options parameters.
|
|
1162
|
+
*/
|
|
1163
|
+
_listByResourceGroup(resourceGroup, options) {
|
|
1164
|
+
return this.client.sendOperationRequest({ resourceGroup, options }, listByResourceGroupOperationSpec);
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* Create/Overwrite Azure Advisor configuration.
|
|
1168
|
+
* @param configurationName Advisor configuration name. Value must be 'default'
|
|
1169
|
+
* @param resourceGroup The name of the Azure resource group.
|
|
1170
|
+
* @param configContract The Azure Advisor configuration data structure.
|
|
1171
|
+
* @param options The options parameters.
|
|
1172
|
+
*/
|
|
1173
|
+
createInResourceGroup(configurationName, resourceGroup, configContract, options) {
|
|
1174
|
+
return this.client.sendOperationRequest({ configurationName, resourceGroup, configContract, options }, createInResourceGroupOperationSpec);
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* ListBySubscriptionNext
|
|
1178
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
|
1179
|
+
* @param options The options parameters.
|
|
1180
|
+
*/
|
|
1181
|
+
_listBySubscriptionNext(nextLink, options) {
|
|
1182
|
+
return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
// Operation Specifications
|
|
1186
|
+
const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
1187
|
+
const listBySubscriptionOperationSpec = {
|
|
1188
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations",
|
|
1189
|
+
httpMethod: "GET",
|
|
1190
|
+
responses: {
|
|
1191
|
+
200: {
|
|
1192
|
+
bodyMapper: ConfigurationListResult
|
|
1193
|
+
},
|
|
1194
|
+
default: {
|
|
1195
|
+
bodyMapper: ArmErrorResponse
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
queryParameters: [apiVersion],
|
|
1199
|
+
urlParameters: [$host, subscriptionId],
|
|
1200
|
+
headerParameters: [accept],
|
|
1201
|
+
serializer: serializer$1
|
|
1202
|
+
};
|
|
1203
|
+
const createInSubscriptionOperationSpec = {
|
|
1204
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}",
|
|
1205
|
+
httpMethod: "PUT",
|
|
1206
|
+
responses: {
|
|
1207
|
+
200: {
|
|
1208
|
+
bodyMapper: ConfigData
|
|
1209
|
+
},
|
|
1210
|
+
default: {
|
|
1211
|
+
bodyMapper: ArmErrorResponse
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
requestBody: configContract,
|
|
1215
|
+
queryParameters: [apiVersion],
|
|
1216
|
+
urlParameters: [
|
|
1217
|
+
$host,
|
|
1218
|
+
subscriptionId,
|
|
1219
|
+
configurationName
|
|
1220
|
+
],
|
|
1221
|
+
headerParameters: [accept, contentType],
|
|
1222
|
+
mediaType: "json",
|
|
1223
|
+
serializer: serializer$1
|
|
1224
|
+
};
|
|
1225
|
+
const listByResourceGroupOperationSpec = {
|
|
1226
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations",
|
|
1227
|
+
httpMethod: "GET",
|
|
1228
|
+
responses: {
|
|
1229
|
+
200: {
|
|
1230
|
+
bodyMapper: ConfigurationListResult
|
|
1231
|
+
},
|
|
1232
|
+
default: {
|
|
1233
|
+
bodyMapper: ArmErrorResponse
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
queryParameters: [apiVersion],
|
|
1237
|
+
urlParameters: [
|
|
1238
|
+
$host,
|
|
1239
|
+
subscriptionId,
|
|
1240
|
+
resourceGroup
|
|
1241
|
+
],
|
|
1242
|
+
headerParameters: [accept],
|
|
1243
|
+
serializer: serializer$1
|
|
1244
|
+
};
|
|
1245
|
+
const createInResourceGroupOperationSpec = {
|
|
1246
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}",
|
|
1247
|
+
httpMethod: "PUT",
|
|
1248
|
+
responses: {
|
|
1249
|
+
200: {
|
|
1250
|
+
bodyMapper: ConfigData
|
|
1251
|
+
},
|
|
1252
|
+
default: {
|
|
1253
|
+
bodyMapper: ArmErrorResponse
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
requestBody: configContract,
|
|
1257
|
+
queryParameters: [apiVersion],
|
|
1258
|
+
urlParameters: [
|
|
1259
|
+
$host,
|
|
1260
|
+
subscriptionId,
|
|
1261
|
+
configurationName,
|
|
1262
|
+
resourceGroup
|
|
1263
|
+
],
|
|
1264
|
+
headerParameters: [accept, contentType],
|
|
1265
|
+
mediaType: "json",
|
|
1266
|
+
serializer: serializer$1
|
|
1267
|
+
};
|
|
1268
|
+
const listBySubscriptionNextOperationSpec = {
|
|
1269
|
+
path: "{nextLink}",
|
|
1270
|
+
httpMethod: "GET",
|
|
1271
|
+
responses: {
|
|
1272
|
+
200: {
|
|
1273
|
+
bodyMapper: ConfigurationListResult
|
|
1274
|
+
},
|
|
1275
|
+
default: {
|
|
1276
|
+
bodyMapper: ArmErrorResponse
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
queryParameters: [apiVersion],
|
|
1280
|
+
urlParameters: [
|
|
1281
|
+
$host,
|
|
1282
|
+
nextLink,
|
|
1283
|
+
subscriptionId
|
|
1284
|
+
],
|
|
1285
|
+
headerParameters: [accept],
|
|
1286
|
+
serializer: serializer$1
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
/*
|
|
1290
|
+
* Copyright (c) Microsoft Corporation.
|
|
1291
|
+
* Licensed under the MIT License.
|
|
1292
|
+
*
|
|
1293
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1294
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1295
|
+
*/
|
|
1296
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1297
|
+
/** Class containing Recommendations operations. */
|
|
1298
|
+
class RecommendationsImpl {
|
|
1299
|
+
/**
|
|
1300
|
+
* Initialize a new instance of the class Recommendations class.
|
|
1301
|
+
* @param client Reference to the service client
|
|
1302
|
+
*/
|
|
1303
|
+
constructor(client) {
|
|
1304
|
+
this.client = client;
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Obtains cached recommendations for a subscription. The recommendations are generated or computed by
|
|
1308
|
+
* invoking generateRecommendations.
|
|
1309
|
+
* @param options The options parameters.
|
|
1310
|
+
*/
|
|
1311
|
+
list(options) {
|
|
1312
|
+
const iter = this.listPagingAll(options);
|
|
1313
|
+
return {
|
|
1314
|
+
next() {
|
|
1315
|
+
return iter.next();
|
|
1316
|
+
},
|
|
1317
|
+
[Symbol.asyncIterator]() {
|
|
1318
|
+
return this;
|
|
1319
|
+
},
|
|
1320
|
+
byPage: () => {
|
|
1321
|
+
return this.listPagingPage(options);
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
}
|
|
1325
|
+
listPagingPage(options) {
|
|
1326
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1327
|
+
let result = yield tslib.__await(this._list(options));
|
|
1328
|
+
yield yield tslib.__await(result.value || []);
|
|
1329
|
+
let continuationToken = result.nextLink;
|
|
1330
|
+
while (continuationToken) {
|
|
1331
|
+
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
1332
|
+
continuationToken = result.nextLink;
|
|
1333
|
+
yield yield tslib.__await(result.value || []);
|
|
1334
|
+
}
|
|
1335
|
+
});
|
|
1336
|
+
}
|
|
1337
|
+
listPagingAll(options) {
|
|
1338
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
1339
|
+
var e_1, _a;
|
|
1340
|
+
try {
|
|
1341
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1342
|
+
const page = _c.value;
|
|
1343
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1347
|
+
finally {
|
|
1348
|
+
try {
|
|
1349
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1350
|
+
}
|
|
1351
|
+
finally { if (e_1) throw e_1.error; }
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
/**
|
|
1356
|
+
* Initiates the recommendation generation or computation process for a subscription. This operation is
|
|
1357
|
+
* asynchronous. The generated recommendations are stored in a cache in the Advisor service.
|
|
1358
|
+
* @param options The options parameters.
|
|
1359
|
+
*/
|
|
1360
|
+
generate(options) {
|
|
1361
|
+
return this.client.sendOperationRequest({ options }, generateOperationSpec);
|
|
1362
|
+
}
|
|
1363
|
+
/**
|
|
1364
|
+
* Retrieves the status of the recommendation computation or generation process. Invoke this API after
|
|
1365
|
+
* calling the generation recommendation. The URI of this API is returned in the Location field of the
|
|
1366
|
+
* response header.
|
|
1367
|
+
* @param operationId The operation ID, which can be found from the Location field in the generate
|
|
1368
|
+
* recommendation response header.
|
|
1369
|
+
* @param options The options parameters.
|
|
1370
|
+
*/
|
|
1371
|
+
getGenerateStatus(operationId, options) {
|
|
1372
|
+
return this.client.sendOperationRequest({ operationId, options }, getGenerateStatusOperationSpec);
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Obtains cached recommendations for a subscription. The recommendations are generated or computed by
|
|
1376
|
+
* invoking generateRecommendations.
|
|
1377
|
+
* @param options The options parameters.
|
|
1378
|
+
*/
|
|
1379
|
+
_list(options) {
|
|
1380
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$1);
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Obtains details of a cached recommendation.
|
|
1384
|
+
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
1385
|
+
* the recommendation applies.
|
|
1386
|
+
* @param recommendationId The recommendation ID.
|
|
1387
|
+
* @param options The options parameters.
|
|
1388
|
+
*/
|
|
1389
|
+
get(resourceUri, recommendationId, options) {
|
|
1390
|
+
return this.client.sendOperationRequest({ resourceUri, recommendationId, options }, getOperationSpec$1);
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1393
|
+
* ListNext
|
|
1394
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
1395
|
+
* @param options The options parameters.
|
|
1396
|
+
*/
|
|
1397
|
+
_listNext(nextLink, options) {
|
|
1398
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
// Operation Specifications
|
|
1402
|
+
const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
1403
|
+
const generateOperationSpec = {
|
|
1404
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations",
|
|
1405
|
+
httpMethod: "POST",
|
|
1406
|
+
responses: {
|
|
1407
|
+
202: {
|
|
1408
|
+
headersMapper: RecommendationsGenerateHeaders
|
|
1409
|
+
},
|
|
1410
|
+
default: {
|
|
1411
|
+
bodyMapper: ArmErrorResponse
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
queryParameters: [apiVersion],
|
|
1415
|
+
urlParameters: [$host, subscriptionId],
|
|
1416
|
+
headerParameters: [accept],
|
|
1417
|
+
serializer: serializer$2
|
|
1418
|
+
};
|
|
1419
|
+
const getGenerateStatusOperationSpec = {
|
|
1420
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations/{operationId}",
|
|
1421
|
+
httpMethod: "GET",
|
|
1422
|
+
responses: {
|
|
1423
|
+
202: {},
|
|
1424
|
+
204: {},
|
|
1425
|
+
default: {
|
|
1426
|
+
bodyMapper: ArmErrorResponse
|
|
1427
|
+
}
|
|
1428
|
+
},
|
|
1429
|
+
queryParameters: [apiVersion],
|
|
1430
|
+
urlParameters: [
|
|
1431
|
+
$host,
|
|
1432
|
+
subscriptionId,
|
|
1433
|
+
operationId
|
|
1434
|
+
],
|
|
1435
|
+
headerParameters: [accept],
|
|
1436
|
+
serializer: serializer$2
|
|
1437
|
+
};
|
|
1438
|
+
const listOperationSpec$1 = {
|
|
1439
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/recommendations",
|
|
1440
|
+
httpMethod: "GET",
|
|
1441
|
+
responses: {
|
|
1442
|
+
200: {
|
|
1443
|
+
bodyMapper: ResourceRecommendationBaseListResult
|
|
1444
|
+
},
|
|
1445
|
+
default: {
|
|
1446
|
+
bodyMapper: ArmErrorResponse
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
queryParameters: [
|
|
1450
|
+
apiVersion,
|
|
1451
|
+
filter,
|
|
1452
|
+
top,
|
|
1453
|
+
skipToken
|
|
1454
|
+
],
|
|
1455
|
+
urlParameters: [$host, subscriptionId],
|
|
1456
|
+
headerParameters: [accept],
|
|
1457
|
+
serializer: serializer$2
|
|
1458
|
+
};
|
|
1459
|
+
const getOperationSpec$1 = {
|
|
1460
|
+
path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}",
|
|
1461
|
+
httpMethod: "GET",
|
|
1462
|
+
responses: {
|
|
1463
|
+
200: {
|
|
1464
|
+
bodyMapper: ResourceRecommendationBase
|
|
1465
|
+
},
|
|
1466
|
+
default: {
|
|
1467
|
+
bodyMapper: ArmErrorResponse
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
queryParameters: [apiVersion],
|
|
1471
|
+
urlParameters: [
|
|
1472
|
+
$host,
|
|
1473
|
+
resourceUri,
|
|
1474
|
+
recommendationId
|
|
1475
|
+
],
|
|
1476
|
+
headerParameters: [accept],
|
|
1477
|
+
serializer: serializer$2
|
|
1478
|
+
};
|
|
1479
|
+
const listNextOperationSpec$1 = {
|
|
1480
|
+
path: "{nextLink}",
|
|
1481
|
+
httpMethod: "GET",
|
|
1482
|
+
responses: {
|
|
1483
|
+
200: {
|
|
1484
|
+
bodyMapper: ResourceRecommendationBaseListResult
|
|
1485
|
+
},
|
|
1486
|
+
default: {
|
|
1487
|
+
bodyMapper: ArmErrorResponse
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
queryParameters: [
|
|
1491
|
+
apiVersion,
|
|
1492
|
+
filter,
|
|
1493
|
+
top,
|
|
1494
|
+
skipToken
|
|
1495
|
+
],
|
|
1496
|
+
urlParameters: [
|
|
1497
|
+
$host,
|
|
1498
|
+
nextLink,
|
|
1499
|
+
subscriptionId
|
|
1500
|
+
],
|
|
1501
|
+
headerParameters: [accept],
|
|
1502
|
+
serializer: serializer$2
|
|
1503
|
+
};
|
|
1504
|
+
|
|
1505
|
+
/*
|
|
1506
|
+
* Copyright (c) Microsoft Corporation.
|
|
1507
|
+
* Licensed under the MIT License.
|
|
1508
|
+
*
|
|
1509
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1510
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1511
|
+
*/
|
|
1512
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1513
|
+
/** Class containing Operations operations. */
|
|
1514
|
+
class OperationsImpl {
|
|
1515
|
+
/**
|
|
1516
|
+
* Initialize a new instance of the class Operations class.
|
|
1517
|
+
* @param client Reference to the service client
|
|
1518
|
+
*/
|
|
1519
|
+
constructor(client) {
|
|
1520
|
+
this.client = client;
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Lists all the available Advisor REST API operations.
|
|
1524
|
+
* @param options The options parameters.
|
|
1525
|
+
*/
|
|
1526
|
+
list(options) {
|
|
1527
|
+
const iter = this.listPagingAll(options);
|
|
1528
|
+
return {
|
|
1529
|
+
next() {
|
|
1530
|
+
return iter.next();
|
|
1531
|
+
},
|
|
1532
|
+
[Symbol.asyncIterator]() {
|
|
1533
|
+
return this;
|
|
1534
|
+
},
|
|
1535
|
+
byPage: () => {
|
|
1536
|
+
return this.listPagingPage(options);
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
listPagingPage(options) {
|
|
1541
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1542
|
+
let result = yield tslib.__await(this._list(options));
|
|
1543
|
+
yield yield tslib.__await(result.value || []);
|
|
1544
|
+
let continuationToken = result.nextLink;
|
|
1545
|
+
while (continuationToken) {
|
|
1546
|
+
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
1547
|
+
continuationToken = result.nextLink;
|
|
1548
|
+
yield yield tslib.__await(result.value || []);
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
listPagingAll(options) {
|
|
1553
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
1554
|
+
var e_1, _a;
|
|
1555
|
+
try {
|
|
1556
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1557
|
+
const page = _c.value;
|
|
1558
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1562
|
+
finally {
|
|
1563
|
+
try {
|
|
1564
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1565
|
+
}
|
|
1566
|
+
finally { if (e_1) throw e_1.error; }
|
|
1567
|
+
}
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Lists all the available Advisor REST API operations.
|
|
1572
|
+
* @param options The options parameters.
|
|
1573
|
+
*/
|
|
1574
|
+
_list(options) {
|
|
1575
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$2);
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* ListNext
|
|
1579
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
1580
|
+
* @param options The options parameters.
|
|
1581
|
+
*/
|
|
1582
|
+
_listNext(nextLink, options) {
|
|
1583
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
// Operation Specifications
|
|
1587
|
+
const serializer$3 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
1588
|
+
const listOperationSpec$2 = {
|
|
1589
|
+
path: "/providers/Microsoft.Advisor/operations",
|
|
1590
|
+
httpMethod: "GET",
|
|
1591
|
+
responses: {
|
|
1592
|
+
200: {
|
|
1593
|
+
bodyMapper: OperationEntityListResult
|
|
1594
|
+
},
|
|
1595
|
+
default: {
|
|
1596
|
+
bodyMapper: ArmErrorResponse
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
queryParameters: [apiVersion],
|
|
1600
|
+
urlParameters: [$host],
|
|
1601
|
+
headerParameters: [accept],
|
|
1602
|
+
serializer: serializer$3
|
|
1603
|
+
};
|
|
1604
|
+
const listNextOperationSpec$2 = {
|
|
1605
|
+
path: "{nextLink}",
|
|
1606
|
+
httpMethod: "GET",
|
|
1607
|
+
responses: {
|
|
1608
|
+
200: {
|
|
1609
|
+
bodyMapper: OperationEntityListResult
|
|
1610
|
+
},
|
|
1611
|
+
default: {
|
|
1612
|
+
bodyMapper: ArmErrorResponse
|
|
1613
|
+
}
|
|
1614
|
+
},
|
|
1615
|
+
queryParameters: [apiVersion],
|
|
1616
|
+
urlParameters: [$host, nextLink],
|
|
1617
|
+
headerParameters: [accept],
|
|
1618
|
+
serializer: serializer$3
|
|
1619
|
+
};
|
|
1620
|
+
|
|
1621
|
+
/*
|
|
1622
|
+
* Copyright (c) Microsoft Corporation.
|
|
1623
|
+
* Licensed under the MIT License.
|
|
1624
|
+
*
|
|
1625
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1626
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1627
|
+
*/
|
|
1628
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1629
|
+
/** Class containing Suppressions operations. */
|
|
1630
|
+
class SuppressionsImpl {
|
|
1631
|
+
/**
|
|
1632
|
+
* Initialize a new instance of the class Suppressions class.
|
|
1633
|
+
* @param client Reference to the service client
|
|
1634
|
+
*/
|
|
1635
|
+
constructor(client) {
|
|
1636
|
+
this.client = client;
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed
|
|
1640
|
+
* attribute of a recommendation is referred to as a suppression.
|
|
1641
|
+
* @param options The options parameters.
|
|
1642
|
+
*/
|
|
1643
|
+
list(options) {
|
|
1644
|
+
const iter = this.listPagingAll(options);
|
|
1645
|
+
return {
|
|
1646
|
+
next() {
|
|
1647
|
+
return iter.next();
|
|
1648
|
+
},
|
|
1649
|
+
[Symbol.asyncIterator]() {
|
|
1650
|
+
return this;
|
|
1651
|
+
},
|
|
1652
|
+
byPage: () => {
|
|
1653
|
+
return this.listPagingPage(options);
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1656
|
+
}
|
|
1657
|
+
listPagingPage(options) {
|
|
1658
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1659
|
+
let result = yield tslib.__await(this._list(options));
|
|
1660
|
+
yield yield tslib.__await(result.value || []);
|
|
1661
|
+
let continuationToken = result.nextLink;
|
|
1662
|
+
while (continuationToken) {
|
|
1663
|
+
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
1664
|
+
continuationToken = result.nextLink;
|
|
1665
|
+
yield yield tslib.__await(result.value || []);
|
|
1666
|
+
}
|
|
1667
|
+
});
|
|
1668
|
+
}
|
|
1669
|
+
listPagingAll(options) {
|
|
1670
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
1671
|
+
var e_1, _a;
|
|
1672
|
+
try {
|
|
1673
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1674
|
+
const page = _c.value;
|
|
1675
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1679
|
+
finally {
|
|
1680
|
+
try {
|
|
1681
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1682
|
+
}
|
|
1683
|
+
finally { if (e_1) throw e_1.error; }
|
|
1684
|
+
}
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
* Obtains the details of a suppression.
|
|
1689
|
+
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
1690
|
+
* the recommendation applies.
|
|
1691
|
+
* @param recommendationId The recommendation ID.
|
|
1692
|
+
* @param name The name of the suppression.
|
|
1693
|
+
* @param options The options parameters.
|
|
1694
|
+
*/
|
|
1695
|
+
get(resourceUri, recommendationId, name, options) {
|
|
1696
|
+
return this.client.sendOperationRequest({ resourceUri, recommendationId, name, options }, getOperationSpec$2);
|
|
1697
|
+
}
|
|
1698
|
+
/**
|
|
1699
|
+
* Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute
|
|
1700
|
+
* is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of
|
|
1701
|
+
* a recommendation.
|
|
1702
|
+
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
1703
|
+
* the recommendation applies.
|
|
1704
|
+
* @param recommendationId The recommendation ID.
|
|
1705
|
+
* @param name The name of the suppression.
|
|
1706
|
+
* @param suppressionContract The snoozed or dismissed attribute; for example, the snooze duration.
|
|
1707
|
+
* @param options The options parameters.
|
|
1708
|
+
*/
|
|
1709
|
+
create(resourceUri, recommendationId, name, suppressionContract, options) {
|
|
1710
|
+
return this.client.sendOperationRequest({ resourceUri, recommendationId, name, suppressionContract, options }, createOperationSpec);
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute
|
|
1714
|
+
* of a recommendation is referred to as a suppression.
|
|
1715
|
+
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
1716
|
+
* the recommendation applies.
|
|
1717
|
+
* @param recommendationId The recommendation ID.
|
|
1718
|
+
* @param name The name of the suppression.
|
|
1719
|
+
* @param options The options parameters.
|
|
1720
|
+
*/
|
|
1721
|
+
delete(resourceUri, recommendationId, name, options) {
|
|
1722
|
+
return this.client.sendOperationRequest({ resourceUri, recommendationId, name, options }, deleteOperationSpec);
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed
|
|
1726
|
+
* attribute of a recommendation is referred to as a suppression.
|
|
1727
|
+
* @param options The options parameters.
|
|
1728
|
+
*/
|
|
1729
|
+
_list(options) {
|
|
1730
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$3);
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* ListNext
|
|
1734
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
1735
|
+
* @param options The options parameters.
|
|
1736
|
+
*/
|
|
1737
|
+
_listNext(nextLink, options) {
|
|
1738
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$3);
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
// Operation Specifications
|
|
1742
|
+
const serializer$4 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
1743
|
+
const getOperationSpec$2 = {
|
|
1744
|
+
path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}",
|
|
1745
|
+
httpMethod: "GET",
|
|
1746
|
+
responses: {
|
|
1747
|
+
200: {
|
|
1748
|
+
bodyMapper: SuppressionContract
|
|
1749
|
+
},
|
|
1750
|
+
404: {
|
|
1751
|
+
bodyMapper: ArmErrorResponse,
|
|
1752
|
+
isError: true
|
|
1753
|
+
},
|
|
1754
|
+
default: {
|
|
1755
|
+
bodyMapper: ArmErrorResponse
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
queryParameters: [apiVersion],
|
|
1759
|
+
urlParameters: [
|
|
1760
|
+
$host,
|
|
1761
|
+
name,
|
|
1762
|
+
resourceUri,
|
|
1763
|
+
recommendationId
|
|
1764
|
+
],
|
|
1765
|
+
headerParameters: [accept],
|
|
1766
|
+
serializer: serializer$4
|
|
1767
|
+
};
|
|
1768
|
+
const createOperationSpec = {
|
|
1769
|
+
path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}",
|
|
1770
|
+
httpMethod: "PUT",
|
|
1771
|
+
responses: {
|
|
1772
|
+
200: {
|
|
1773
|
+
bodyMapper: SuppressionContract
|
|
1774
|
+
},
|
|
1775
|
+
404: {
|
|
1776
|
+
bodyMapper: ArmErrorResponse,
|
|
1777
|
+
isError: true
|
|
1778
|
+
},
|
|
1779
|
+
default: {
|
|
1780
|
+
bodyMapper: ArmErrorResponse
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
requestBody: suppressionContract,
|
|
1784
|
+
queryParameters: [apiVersion],
|
|
1785
|
+
urlParameters: [
|
|
1786
|
+
$host,
|
|
1787
|
+
name,
|
|
1788
|
+
resourceUri,
|
|
1789
|
+
recommendationId
|
|
1790
|
+
],
|
|
1791
|
+
headerParameters: [accept, contentType],
|
|
1792
|
+
mediaType: "json",
|
|
1793
|
+
serializer: serializer$4
|
|
1794
|
+
};
|
|
1795
|
+
const deleteOperationSpec = {
|
|
1796
|
+
path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}",
|
|
1797
|
+
httpMethod: "DELETE",
|
|
1798
|
+
responses: {
|
|
1799
|
+
204: {},
|
|
1800
|
+
default: {
|
|
1801
|
+
bodyMapper: ArmErrorResponse
|
|
1802
|
+
}
|
|
1803
|
+
},
|
|
1804
|
+
queryParameters: [apiVersion],
|
|
1805
|
+
urlParameters: [
|
|
1806
|
+
$host,
|
|
1807
|
+
name,
|
|
1808
|
+
resourceUri,
|
|
1809
|
+
recommendationId
|
|
1810
|
+
],
|
|
1811
|
+
headerParameters: [accept],
|
|
1812
|
+
serializer: serializer$4
|
|
1813
|
+
};
|
|
1814
|
+
const listOperationSpec$3 = {
|
|
1815
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/suppressions",
|
|
1816
|
+
httpMethod: "GET",
|
|
1817
|
+
responses: {
|
|
1818
|
+
200: {
|
|
1819
|
+
bodyMapper: SuppressionContractListResult
|
|
1820
|
+
},
|
|
1821
|
+
default: {
|
|
1822
|
+
bodyMapper: ArmErrorResponse
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
queryParameters: [
|
|
1826
|
+
apiVersion,
|
|
1827
|
+
top,
|
|
1828
|
+
skipToken
|
|
1829
|
+
],
|
|
1830
|
+
urlParameters: [$host, subscriptionId],
|
|
1831
|
+
headerParameters: [accept],
|
|
1832
|
+
serializer: serializer$4
|
|
1833
|
+
};
|
|
1834
|
+
const listNextOperationSpec$3 = {
|
|
1835
|
+
path: "{nextLink}",
|
|
1836
|
+
httpMethod: "GET",
|
|
1837
|
+
responses: {
|
|
1838
|
+
200: {
|
|
1839
|
+
bodyMapper: SuppressionContractListResult
|
|
1840
|
+
},
|
|
1841
|
+
default: {
|
|
1842
|
+
bodyMapper: ArmErrorResponse
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
queryParameters: [
|
|
1846
|
+
apiVersion,
|
|
1847
|
+
top,
|
|
1848
|
+
skipToken
|
|
1849
|
+
],
|
|
1850
|
+
urlParameters: [
|
|
1851
|
+
$host,
|
|
1852
|
+
nextLink,
|
|
1853
|
+
subscriptionId
|
|
1854
|
+
],
|
|
1855
|
+
headerParameters: [accept],
|
|
1856
|
+
serializer: serializer$4
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
/*
|
|
1860
|
+
* Copyright (c) Microsoft Corporation.
|
|
1861
|
+
* Licensed under the MIT License.
|
|
1862
|
+
*
|
|
1863
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1864
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1865
|
+
*/
|
|
1866
|
+
class AdvisorManagementClient extends coreClient.ServiceClient {
|
|
1867
|
+
/**
|
|
1868
|
+
* Initializes a new instance of the AdvisorManagementClient class.
|
|
1869
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1870
|
+
* @param subscriptionId The Azure subscription ID.
|
|
1871
|
+
* @param options The parameter options
|
|
1872
|
+
*/
|
|
1873
|
+
constructor(credentials, subscriptionId, options) {
|
|
1874
|
+
if (credentials === undefined) {
|
|
1875
|
+
throw new Error("'credentials' cannot be null");
|
|
1876
|
+
}
|
|
1877
|
+
if (subscriptionId === undefined) {
|
|
1878
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
1879
|
+
}
|
|
1880
|
+
// Initializing default values for options
|
|
1881
|
+
if (!options) {
|
|
1882
|
+
options = {};
|
|
1883
|
+
}
|
|
1884
|
+
const defaults = {
|
|
1885
|
+
requestContentType: "application/json; charset=utf-8",
|
|
1886
|
+
credential: credentials
|
|
1887
|
+
};
|
|
1888
|
+
const packageDetails = `azsdk-js-arm-advisor/3.0.0`;
|
|
1889
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1890
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1891
|
+
: `${packageDetails}`;
|
|
1892
|
+
if (!options.credentialScopes) {
|
|
1893
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
1894
|
+
}
|
|
1895
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1896
|
+
userAgentPrefix
|
|
1897
|
+
}, baseUri: options.endpoint || "https://management.azure.com" });
|
|
1898
|
+
super(optionsWithDefaults);
|
|
1899
|
+
// Parameter assignments
|
|
1900
|
+
this.subscriptionId = subscriptionId;
|
|
1901
|
+
// Assigning values to Constant parameters
|
|
1902
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
1903
|
+
this.apiVersion = options.apiVersion || "2020-01-01";
|
|
1904
|
+
this.recommendationMetadata = new RecommendationMetadataImpl(this);
|
|
1905
|
+
this.configurations = new ConfigurationsImpl(this);
|
|
1906
|
+
this.recommendations = new RecommendationsImpl(this);
|
|
1907
|
+
this.operations = new OperationsImpl(this);
|
|
1908
|
+
this.suppressions = new SuppressionsImpl(this);
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
exports.AdvisorManagementClient = AdvisorManagementClient;
|
|
1913
|
+
//# sourceMappingURL=index.js.map
|