Skip to content

Commit fc24857

Browse files
authored
[Hub Generated] Review request for Microsoft.Insights to add version stable/2018-09-01 (#12496)
* fixing swagger correctness stuff * changed example file * unfixed typo * PR fixes * PR fixes * some PR fixes * try to change to metdata * trying to fix metadatajson * added metdata to custom-words * refer to baseline def from calc baselines * changed timestamps * changed location of metdata custom word * changed reference * changed back timestamps
1 parent b5e19dc commit fc24857

File tree

5 files changed

+191
-119
lines changed

5 files changed

+191
-119
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,7 @@ ProviderHub
20712071
checkin
20722072
regionality
20732073
Resource
2074+
metdata
20742075
Metastores
20752076
maintenancewindows
20762077
Logix

specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json

Lines changed: 91 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,61 @@
230230
"readOnly": true,
231231
"description": "The name and the display name of the metric, i.e. it is localizable string."
232232
},
233+
"timestamps": {
234+
"type": "array",
235+
"items": {
236+
"type": "string",
237+
"format": "date-time",
238+
"description": "The timestamp for the baseline value in ISO 8601 format."
239+
},
240+
"description": "The array of timestamps of the baselines."
241+
},
242+
"baseline": {
243+
"type": "array",
244+
"items": {
245+
"$ref": "#/definitions/Baseline"
246+
},
247+
"description": "The baseline values for each sensitivity."
248+
},
249+
"metdata": {
250+
"type": "array",
251+
"items": {
252+
"$ref": "#/definitions/BaselineMetadataValue"
253+
},
254+
"description": "The baseline metadata values."
255+
},
256+
"predictionResultType": {
257+
"type": "integer",
258+
"format": "int32",
259+
"enum": [
260+
0,
261+
1,
262+
2
263+
],
264+
"x-ms-enum": {
265+
"name": "PredictionResultType",
266+
"modelAsString": false
267+
},
268+
"description": "The prediction result type of the baseline."
269+
},
270+
"errorType": {
271+
"type": "integer",
272+
"format": "int32",
273+
"enum": [
274+
0,
275+
1,
276+
2,
277+
3,
278+
4,
279+
100,
280+
200
281+
],
282+
"x-ms-enum": {
283+
"name": "ErrorType",
284+
"modelAsString": false
285+
},
286+
"description": "The error type of the baseline."
287+
},
233288
"properties": {
234289
"x-ms-client-flatten": true,
235290
"$ref": "#/definitions/BaselineProperties",
@@ -253,28 +308,10 @@
253308
"type": "string",
254309
"description": "The aggregation type of the metric."
255310
},
256-
"timestamps": {
257-
"type": "array",
258-
"items": {
259-
"type": "string",
260-
"format": "date-time",
261-
"description": "The timestamp for the baseline value in ISO 8601 format."
262-
},
263-
"description": "The array of timestamps of the baselines."
264-
},
265-
"baseline": {
266-
"type": "array",
267-
"items": {
268-
"$ref": "#/definitions/Baseline"
269-
},
270-
"description": "The baseline values for each sensitivity."
271-
},
272-
"metadata": {
273-
"type": "array",
274-
"items": {
275-
"$ref": "#/definitions/BaselineMetadataValue"
276-
},
277-
"description": "The baseline metadata values."
311+
"internalOperationId": {
312+
"type": "string",
313+
"readOnly": true,
314+
"description": "internal operation id"
278315
}
279316
},
280317
"description": "The baseline properties class."
@@ -321,6 +358,38 @@
321358
"description": "the timestamp for the baseline value in ISO 8601 format."
322359
},
323360
"description": "the array of timestamps of the baselines."
361+
},
362+
"PredictionResultType": {
363+
"type": "integer",
364+
"format": "int32",
365+
"enum": [
366+
0,
367+
1,
368+
2
369+
],
370+
"x-ms-enum": {
371+
"name": "PredictionResultType",
372+
"modelAsString": false
373+
},
374+
"description": "The prediction result type of the baseline."
375+
},
376+
"ErrorType": {
377+
"type": "integer",
378+
"format": "int32",
379+
"enum": [
380+
0,
381+
1,
382+
2,
383+
3,
384+
4,
385+
100,
386+
200
387+
],
388+
"x-ms-enum": {
389+
"name": "ErrorType",
390+
"modelAsString": false
391+
},
392+
"description": "The error type of the baseline."
324393
}
325394
},
326395
"required": [

specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
"baseline": {
152152
"type": "array",
153153
"items": {
154-
"$ref": "#/definitions/Baseline"
154+
"$ref": "./baseline_API.json#/definitions/Baseline"
155155
},
156156
"description": "The baseline values for each sensitivity."
157157
},
@@ -188,57 +188,6 @@
188188
"baseline"
189189
],
190190
"description": "The response to a calculate baseline call."
191-
},
192-
"Baseline": {
193-
"type": "object",
194-
"properties": {
195-
"sensitivity": {
196-
"type": "string",
197-
"enum": [
198-
"Low",
199-
"Medium",
200-
"High"
201-
],
202-
"x-ms-enum": {
203-
"name": "Sensitivity",
204-
"modelAsString": false
205-
},
206-
"description": "The sensitivity of the baseline."
207-
},
208-
"lowThresholds": {
209-
"type": "array",
210-
"items": {
211-
"type": "number",
212-
"format": "double",
213-
"description": "A single low threshold value."
214-
},
215-
"description": "The low thresholds of the baseline."
216-
},
217-
"highThresholds": {
218-
"type": "array",
219-
"items": {
220-
"type": "number",
221-
"format": "double",
222-
"description": "A single high threshold value."
223-
},
224-
"description": "The high thresholds of the baseline."
225-
},
226-
"timestamps": {
227-
"type": "array",
228-
"items": {
229-
"type": "string",
230-
"format": "date-time",
231-
"description": "the timestamp for the baseline value in ISO 8601 format."
232-
},
233-
"description": "the array of timestamps of the baselines."
234-
}
235-
},
236-
"required": [
237-
"sensitivity",
238-
"lowThresholds",
239-
"highThresholds"
240-
],
241-
"description": "The baseline values for a single sensitivity value."
242191
}
243192
},
244193
"parameters": {

specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/examples/GetBaseline.json

Lines changed: 86 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,97 @@
1111
"responses": {
1212
"200": {
1313
"body": {
14+
"type": "microsoft.insights/baseline",
1415
"id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/baseline/PercentageCpu",
15-
"type": "Microsoft.Insights/baseline",
1616
"name": {
17-
"value": "PercentageCpu"
17+
"value": "PercentageCpu",
18+
"localizedValue": null
1819
},
1920
"properties": {
20-
"timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
21-
"aggregation": "Average",
2221
"interval": "PT1H",
23-
"timestamps": [
24-
"2017-04-14T02:20:00Z",
25-
"2017-04-14T03:20:00Z"
26-
],
27-
"baseline": [
28-
{
29-
"sensitivity": "Low",
30-
"lowThresholds": [
31-
30.0,
32-
31.1
33-
],
34-
"highThresholds": [
35-
90.3453,
36-
91.3453
37-
]
38-
},
39-
{
40-
"sensitivity": "Medium",
41-
"lowThresholds": [
42-
50.0,
43-
51.1
44-
],
45-
"highThresholds": [
46-
70.3453,
47-
71.3453
48-
]
49-
}
50-
]
51-
}
22+
"aggregation": "Average",
23+
"timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
24+
"internalOperationId": "ab6700cb-7579-42ea-a032-ec0be8537564"
25+
},
26+
"timestamps": [
27+
"2021-01-08T00:00:00Z",
28+
"2021-01-08T00:05:00Z",
29+
"2021-01-08T00:10:00Z",
30+
"2021-01-08T00:15:00Z",
31+
"2021-01-08T00:20:00Z",
32+
"2021-01-08T00:25:00Z",
33+
"2021-01-08T00:30:00Z",
34+
"2021-01-08T00:35:00Z",
35+
"2021-01-08T00:40:00Z",
36+
"2021-01-08T00:45:00Z",
37+
"2021-01-08T00:50:00Z",
38+
"2021-01-08T00:55:00Z",
39+
"2021-01-08T01:00:00Z"
40+
],
41+
"baseline": [
42+
{
43+
"sensitivity": "Low",
44+
"lowThresholds": [
45+
6,
46+
6,
47+
6,
48+
6,
49+
6,
50+
6,
51+
6,
52+
6,
53+
6,
54+
6,
55+
6,
56+
6,
57+
6
58+
],
59+
"highThresholds": [
60+
14,
61+
14,
62+
14,
63+
14,
64+
14,
65+
14,
66+
14,
67+
14,
68+
14,
69+
14,
70+
14,
71+
14,
72+
14
73+
],
74+
"timestamps": [
75+
"2021-01-08T00:00:00Z",
76+
"2021-01-08T00:05:00Z",
77+
"2021-01-08T00:10:00Z",
78+
"2021-01-08T00:15:00Z",
79+
"2021-01-08T00:20:00Z",
80+
"2021-01-08T00:25:00Z",
81+
"2021-01-08T00:30:00Z",
82+
"2021-01-08T00:35:00Z",
83+
"2021-01-08T00:40:00Z",
84+
"2021-01-08T00:45:00Z",
85+
"2021-01-08T00:50:00Z",
86+
"2021-01-08T00:55:00Z",
87+
"2021-01-08T01:00:00Z"
88+
],
89+
"PredictionResultType": 1,
90+
"ErrorType": 0
91+
}
92+
],
93+
"metdata": [
94+
{
95+
"name": "",
96+
"value": "a"
97+
},
98+
{
99+
"name": "",
100+
"value": ""
101+
}
102+
],
103+
"predictionResultType": 1,
104+
"errorType": 0
52105
}
53106
}
54107
}

specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/examples/GetBaselineMetadata.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
"properties": {
2020
"timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
2121
"aggregation": "Average",
22-
"interval": "PT1H",
23-
"metadata": [
24-
{
25-
"name": "CurrentTrainingState",
26-
"value": "Trained"
27-
},
28-
{
29-
"name": "SelectedModel",
30-
"value": "AdjustedBoxplot"
31-
}
32-
]
33-
}
22+
"interval": "PT1H"
23+
},
24+
"metdata": [
25+
{
26+
"name": "CurrentTrainingState",
27+
"value": "Trained"
28+
},
29+
{
30+
"name": "SelectedModel",
31+
"value": "AdjustedBoxplot"
32+
}
33+
]
3434
}
3535
}
3636
}

0 commit comments

Comments
 (0)