You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Monitor] Add Public Preview APIs of Metric Baseline (#2049)
* [Monitor] Add Public Preview APIs of Metric Baseline
These APIs include:
1. Getting the pre-calculated baseline of a metric
2. Calculating the baseline of a metric given the metric values
* Fixed comments on swagger structure
* Fixed Sensitivity enum name
* Fixed sensitivity enum name
"Get Metric for data": { "$ref": "./examples/GetBaseline.json" },
130
+
"Get Metric for metadata": { "$ref": "./examples/GetBaselineMetadata.json" }
131
+
}
132
+
}
133
+
}
134
+
},
135
+
"definitions": {
136
+
"LocalizableString": {
137
+
"required": [ "value" ],
138
+
"properties": {
139
+
"value": {
140
+
"type": "string",
141
+
"description": "the invariant value."
142
+
},
143
+
"localizedValue": {
144
+
"type": "string",
145
+
"description": "the locale specific value."
146
+
}
147
+
},
148
+
"description": "The localizable string class."
149
+
},
150
+
"BaselineMetadataValue": {
151
+
"properties": {
152
+
"name": {
153
+
"$ref": "#/definitions/LocalizableString",
154
+
"description": "the name of the metadata."
155
+
},
156
+
"value": {
157
+
"type": "string",
158
+
"description": "the value of the metadata."
159
+
}
160
+
},
161
+
"description": "Represents a baseline metadata value."
162
+
},
163
+
"ErrorResponse": {
164
+
"description": "Describes the format of Error response.",
165
+
"type": "object",
166
+
"properties": {
167
+
"code": {
168
+
"description": "Error code",
169
+
"type": "string"
170
+
},
171
+
"message": {
172
+
"description": "Error message indicating why the operation failed.",
173
+
"type": "string"
174
+
}
175
+
}
176
+
},
177
+
"BaselineResponse": {
178
+
"type": "object",
179
+
"properties": {
180
+
"id": {
181
+
"type": "string",
182
+
"readOnly": true,
183
+
"description": "the metric baseline Id."
184
+
},
185
+
"type": {
186
+
"type": "string",
187
+
"readOnly": true,
188
+
"description": "the resource type of the baseline resource."
189
+
},
190
+
"name": {
191
+
"$ref": "#/definitions/LocalizableString",
192
+
"readOnly": true,
193
+
"description": "the name and the display name of the metric, i.e. it is localizable string."
194
+
},
195
+
"properties": {
196
+
"x-ms-client-flatten": true,
197
+
"$ref": "#/definitions/BaselineProperties",
198
+
"description": "the properties of the baseline."
199
+
}
200
+
},
201
+
"description": "The response to a baseline query."
202
+
},
203
+
"BaselineProperties": {
204
+
"properties": {
205
+
"timespan": {
206
+
"type": "string",
207
+
"description": "The timespan for which the data was retrieved. Its value consists of two datatimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested."
208
+
},
209
+
"interval": {
210
+
"type": "string",
211
+
"format": "duration",
212
+
"description": "The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made."
213
+
},
214
+
"aggregation": {
215
+
"type": "string",
216
+
"description": "The aggregation type of the metric."
217
+
},
218
+
"timestamps": {
219
+
"type": "array",
220
+
"items": {
221
+
"type": "string",
222
+
"format": "date-time",
223
+
"description": "the timestamp for the baseline value in ISO 8601 format."
224
+
},
225
+
"description": "the array of timestamps of the baselines."
226
+
},
227
+
"baseline": {
228
+
"type": "array",
229
+
"items": {
230
+
"$ref": "#/definitions/Baseline"
231
+
},
232
+
"description": "the baseline values for each sensitivity."
233
+
},
234
+
"metadata": {
235
+
"type": "array",
236
+
"items": {
237
+
"$ref": "#/definitions/BaselineMetadataValue"
238
+
},
239
+
"description": "the baseline metadata values."
240
+
}
241
+
},
242
+
"description": "The baseline properties class."
243
+
},
244
+
"Baseline": {
245
+
"type": "object",
246
+
"properties": {
247
+
"sensitivity": {
248
+
"type": "string",
249
+
"enum": [
250
+
"Low",
251
+
"Medium",
252
+
"High"
253
+
],
254
+
"x-ms-enum": {
255
+
"name": "Sensitivity",
256
+
"modelAsString": false
257
+
},
258
+
"description": "the sensitivity of the baseline."
259
+
},
260
+
"lowThresholds": {
261
+
"type": "array",
262
+
"items": {
263
+
"type": "number",
264
+
"format": "double",
265
+
"description": "A single low threshold value."
266
+
},
267
+
"description": "The low thresholds of the baseline."
268
+
},
269
+
"highThresholds": {
270
+
"type": "array",
271
+
"items": {
272
+
"type": "number",
273
+
"format": "double",
274
+
"description": "A single high threshold value."
275
+
},
276
+
"description": "The high thresholds of the baseline."
"description": "The baseline values for a single sensitivity value."
281
+
}
282
+
},
283
+
"parameters": {
284
+
"ExtendedResourceUriParameter": {
285
+
"name": "resourceUri",
286
+
"in": "path",
287
+
"required": true,
288
+
"type": "string",
289
+
"description": "The identifier of the resource. It has the following structure: subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. For example: subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1",
290
+
"x-ms-parameter-location": "method",
291
+
"x-ms-skip-url-encoding": true
292
+
},
293
+
"MetricNameParameter": {
294
+
"name": "metricName",
295
+
"in": "path",
296
+
"required": true,
297
+
"type": "string",
298
+
"description": "The name of the metric to retrieve the baseline for.",
299
+
"x-ms-parameter-location": "method"
300
+
},
301
+
"TimespanParameter": {
302
+
"name": "timespan",
303
+
"in": "query",
304
+
"required": false,
305
+
"type": "string",
306
+
"description": "The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.",
307
+
"x-ms-parameter-location": "method"
308
+
},
309
+
"IntervalParameter": {
310
+
"name": "interval",
311
+
"in": "query",
312
+
"required": false,
313
+
"type": "string",
314
+
"format": "duration",
315
+
"description": "The interval (i.e. timegrain) of the query.",
316
+
"x-ms-parameter-location": "method"
317
+
},
318
+
"AggregationParameter": {
319
+
"name": "aggregation",
320
+
"in": "query",
321
+
"required": false,
322
+
"type": "string",
323
+
"description": "The aggregation type of the metric to retrieve the baseline for.",
324
+
"x-ms-parameter-location": "method"
325
+
},
326
+
"SensitivitiesParameter": {
327
+
"name": "sensitivities",
328
+
"in": "query",
329
+
"required": false,
330
+
"type": "string",
331
+
"description": "The list of sensitivities (comma separated) to retrieve.",
332
+
"x-ms-parameter-location": "method"
333
+
},
334
+
"BaselineResultTypeParameter": {
335
+
"name": "resultType",
336
+
"in": "query",
337
+
"type": "string",
338
+
"enum": [
339
+
"Data",
340
+
"Metadata"
341
+
],
342
+
"x-ms-enum": {
343
+
"name": "ResultType",
344
+
"modelAsString": false
345
+
},
346
+
"description": "Allows retrieving only metadata of the baseline. On data request all information is retrieved.",
0 commit comments