Skip to content

Commit dc7ac44

Browse files
ToddKingMSFTarifibrahim4
authored andcommitted
[Hub Generated] Review request for Microsoft.Insights to add version stable/2023-10-01 (#26655)
* Adds base for updating Microsoft.Insights from version preview/2023-05-01-preview to version 2023-10-01 * Updates readme * Updates API version in new specs and examples * Introduce the new 2023-10-01 metrics API versions * Update * Fix avacado * Fix up examples and body parameters * Fix example formatting * Remove paging * Fix prettier formatting and suppress lint rules that would cause a breaking change if addressed. * Make changes requested by stewardship board * update batch examples * Add x-ms-pageable back in * Update description * Just use the existing 2015-04-01 operations API all past APIs used. * use ErrorResponse from common-types v1 for APIs with legacy error response
1 parent 2fd9000 commit dc7ac44

22 files changed

Lines changed: 11174 additions & 18 deletions

specification/monitor/commonDefinitions.json renamed to specification/monitor/common-types/v1/commonMonitoringTypes.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"version": "2023-11-01",
4+
"version": "1.0",
55
"title": "Common Monitoring types"
66
},
77
"paths": {},
@@ -110,7 +110,7 @@
110110
"x-ms-identifiers": [
111111
"name"
112112
],
113-
"description": "the metadata values returned if $filter was specified in the call."
113+
"description": "The metadata values returned if $filter was specified in the call."
114114
},
115115
"data": {
116116
"type": "array",
@@ -130,15 +130,15 @@
130130
"properties": {
131131
"id": {
132132
"type": "string",
133-
"description": "the metric Id."
133+
"description": "The metric Id."
134134
},
135135
"type": {
136136
"type": "string",
137-
"description": "the resource type of the metric resource."
137+
"description": "The resource type of the metric resource."
138138
},
139139
"name": {
140140
"$ref": "#/definitions/LocalizableString",
141-
"description": "the name and the display name of the metric, i.e. it is localizable string."
141+
"description": "The name and the display name of the metric, i.e. it is localizable string."
142142
},
143143
"displayDescription": {
144144
"type": "string",
@@ -162,7 +162,7 @@
162162
"$ref": "#/definitions/TimeSeriesElement"
163163
},
164164
"x-ms-identifiers": [],
165-
"description": "the time series returned when a data query is performed."
165+
"description": "The time series returned when a data query is performed."
166166
}
167167
},
168168
"required": [
Lines changed: 303 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,303 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2.0",
5+
"title": "Common Monitoring types"
6+
},
7+
"paths": {},
8+
"definitions": {
9+
"LocalizableString": {
10+
"type": "object",
11+
"required": [
12+
"value"
13+
],
14+
"properties": {
15+
"value": {
16+
"type": "string",
17+
"description": "The invariant value."
18+
},
19+
"localizedValue": {
20+
"type": "string",
21+
"description": "The display name."
22+
}
23+
},
24+
"description": "The localizable string class."
25+
},
26+
"MetricValue": {
27+
"type": "object",
28+
"required": [
29+
"timeStamp"
30+
],
31+
"properties": {
32+
"timeStamp": {
33+
"type": "string",
34+
"format": "date-time",
35+
"description": "The timestamp for the metric value in ISO 8601 format."
36+
},
37+
"average": {
38+
"type": "number",
39+
"format": "double",
40+
"description": "The average value in the time range."
41+
},
42+
"minimum": {
43+
"type": "number",
44+
"format": "double",
45+
"description": "The least value in the time range."
46+
},
47+
"maximum": {
48+
"type": "number",
49+
"format": "double",
50+
"description": "The greatest value in the time range."
51+
},
52+
"total": {
53+
"type": "number",
54+
"format": "double",
55+
"description": "The sum of all of the values in the time range."
56+
},
57+
"count": {
58+
"type": "number",
59+
"format": "double",
60+
"description": "The number of samples in the time range. Can be used to determine the number of values that contributed to the average value."
61+
}
62+
},
63+
"description": "Represents a metric value."
64+
},
65+
"MetadataValue": {
66+
"type": "object",
67+
"properties": {
68+
"name": {
69+
"$ref": "#/definitions/LocalizableString",
70+
"description": "The name of the metadata."
71+
},
72+
"value": {
73+
"type": "string",
74+
"description": "The value of the metadata."
75+
}
76+
},
77+
"description": "Represents a metric metadata value."
78+
},
79+
"Unit": {
80+
"type": "string",
81+
"description": "The unit of the metric.",
82+
"enum": [
83+
"Count",
84+
"Bytes",
85+
"Seconds",
86+
"CountPerSecond",
87+
"BytesPerSecond",
88+
"Percent",
89+
"MilliSeconds",
90+
"ByteSeconds",
91+
"Unspecified",
92+
"Cores",
93+
"MilliCores",
94+
"NanoCores",
95+
"BitsPerSecond"
96+
],
97+
"x-ms-enum": {
98+
"name": "MetricUnit",
99+
"modelAsString": true,
100+
"values": [
101+
{
102+
"value": "Count",
103+
"description": "Unit of raw quantity."
104+
},
105+
{
106+
"value": "Bytes",
107+
"description": "Unit of memory in bytes."
108+
},
109+
{
110+
"value": "Seconds",
111+
"description": "Unit of time in seconds."
112+
},
113+
{
114+
"value": "CountPerSecond",
115+
"description": "Rate unit of raw quantity per second."
116+
},
117+
{
118+
"value": "BytesPerSecond",
119+
"description": "Rate unit of memory in bytes per second."
120+
},
121+
{
122+
"value": "Percent",
123+
"description": "Percentage unit."
124+
},
125+
{
126+
"value": "MilliSeconds",
127+
"description": "Unit of time in 1/1000th of a second."
128+
},
129+
{
130+
"value": "ByteSeconds",
131+
"description": "Unit of data transfer or storage. It is the size of the data in bytes multiplied by the time it takes to transfer or store the data in seconds."
132+
},
133+
{
134+
"value": "Unspecified",
135+
"description": "No specified unit."
136+
},
137+
{
138+
"value": "Cores",
139+
"description": "Unit of processing power."
140+
},
141+
{
142+
"value": "MilliCores",
143+
"description": "Unit of processing power in 1/1000th of a CPU core."
144+
},
145+
{
146+
"value": "NanoCores",
147+
"description": "Unit of processing power in one billionth of a CPU core."
148+
},
149+
{
150+
"value": "BitsPerSecond",
151+
"description": "Rate unit of binary digits per second."
152+
}
153+
]
154+
}
155+
},
156+
"TimeSeriesElement": {
157+
"type": "object",
158+
"properties": {
159+
"metadatavalues": {
160+
"type": "array",
161+
"items": {
162+
"$ref": "#/definitions/MetadataValue"
163+
},
164+
"x-ms-identifiers": [
165+
"name"
166+
],
167+
"description": "The metadata values returned if $filter was specified in the call."
168+
},
169+
"data": {
170+
"type": "array",
171+
"items": {
172+
"$ref": "#/definitions/MetricValue"
173+
},
174+
"x-ms-identifiers": [
175+
"timeStamp"
176+
],
177+
"description": "An array of data points representing the metric values. This is only returned if a result type of data is specified."
178+
}
179+
},
180+
"description": "A time series result type. The discriminator value is always TimeSeries in this case."
181+
},
182+
"Metric": {
183+
"type": "object",
184+
"properties": {
185+
"id": {
186+
"type": "string",
187+
"description": "The metric Id."
188+
},
189+
"type": {
190+
"type": "string",
191+
"description": "The resource type of the metric resource."
192+
},
193+
"name": {
194+
"$ref": "#/definitions/LocalizableString",
195+
"description": "The name and the display name of the metric, i.e. it is localizable string."
196+
},
197+
"displayDescription": {
198+
"type": "string",
199+
"description": "Detailed description of this metric."
200+
},
201+
"errorCode": {
202+
"type": "string",
203+
"description": "'Success' or the error details on query failures for this metric."
204+
},
205+
"errorMessage": {
206+
"type": "string",
207+
"description": "Error message encountered querying this specific metric."
208+
},
209+
"unit": {
210+
"$ref": "#/definitions/Unit",
211+
"description": "The unit of the metric."
212+
},
213+
"timeseries": {
214+
"type": "array",
215+
"items": {
216+
"$ref": "#/definitions/TimeSeriesElement"
217+
},
218+
"x-ms-identifiers": [],
219+
"description": "The time series returned when a data query is performed."
220+
}
221+
},
222+
"required": [
223+
"id",
224+
"type",
225+
"name",
226+
"unit",
227+
"timeseries"
228+
],
229+
"description": "The result data of a query."
230+
},
231+
"ErrorContract": {
232+
"title": "Error Response",
233+
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)",
234+
"type": "object",
235+
"properties": {
236+
"error": {
237+
"description": "The error object.",
238+
"$ref": "../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
239+
}
240+
}
241+
}
242+
},
243+
"parameters": {
244+
"ResourceUriParameter": {
245+
"name": "resourceUri",
246+
"in": "path",
247+
"required": true,
248+
"type": "string",
249+
"description": "The identifier of the resource.",
250+
"x-ms-parameter-location": "method",
251+
"x-ms-skip-url-encoding": true
252+
},
253+
"RegionParameter": {
254+
"name": "region",
255+
"in": "query",
256+
"required": true,
257+
"type": "string",
258+
"description": "The region where the metrics you want reside.",
259+
"x-ms-parameter-location": "method"
260+
},
261+
"MetricNamespaceParameter": {
262+
"name": "metricnamespace",
263+
"in": "query",
264+
"required": false,
265+
"type": "string",
266+
"description": "Metric namespace where the metrics you want reside.",
267+
"x-ms-parameter-location": "method"
268+
},
269+
"AggregationsParameter": {
270+
"name": "aggregation",
271+
"in": "query",
272+
"required": false,
273+
"type": "string",
274+
"description": "The list of aggregation types (comma separated) to retrieve.\n*Examples: average, minimum, maximum*",
275+
"x-ms-parameter-location": "method"
276+
},
277+
"TopParameter": {
278+
"name": "top",
279+
"in": "query",
280+
"required": false,
281+
"type": "integer",
282+
"format": "int32",
283+
"description": "The maximum number of records to retrieve per resource ID in the request.\nValid only if filter is specified.\nDefaults to 10.",
284+
"x-ms-parameter-location": "method"
285+
},
286+
"OrderByParameter": {
287+
"name": "orderby",
288+
"in": "query",
289+
"required": false,
290+
"type": "string",
291+
"description": "The aggregation to use for sorting results and the direction of the sort.\nOnly one order can be specified.\n*Examples: sum asc*",
292+
"x-ms-parameter-location": "method"
293+
},
294+
"RollUpByParameter": {
295+
"name": "rollupby",
296+
"in": "query",
297+
"required": false,
298+
"type": "string",
299+
"description": "Dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.",
300+
"x-ms-parameter-location": "method"
301+
}
302+
}
303+
}

specification/monitor/data-plane/Microsoft.Insights/preview/2023-05-01-preview/metricBatch.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"required": false,
160160
"type": "string",
161161
"default": "PT1M",
162-
"description": "The interval (i.e. timegrain) of the query.\n*Examples: PT15M, PT1H, P1D*",
162+
"description": "The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for 'FULL' value that returns single datapoint for entire time span requested.\n*Examples: PT15M, PT1H, P1D, FULL*",
163163
"x-ms-parameter-location": "method"
164164
},
165165
"MetricNamespaceParameter": {
@@ -309,8 +309,7 @@
309309
},
310310
"interval": {
311311
"type": "string",
312-
"format": "duration",
313-
"description": "The interval (window size) for which the metric data was returned in. Follows the IS8601/RFC3339 duration format (e.g. 'P1D' for 1 day). 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."
312+
"description": "The interval (window size) for which the metric data was returned in ISO 8601 duration format with a special case for 'FULL' value that returns single datapoint for entire time span requested (*Examples: PT15M, PT1H, P1D, FULL*). \nThis may be adjusted and different from what was originally requested if AutoAdjustTimegrain=true is specified."
314313
},
315314
"namespace": {
316315
"type": "string",
@@ -327,7 +326,7 @@
327326
"value": {
328327
"type": "array",
329328
"items": {
330-
"$ref": "../../../../commonDefinitions.json#/definitions/Metric"
329+
"$ref": "../../../../common-types/v1/commonMonitoringTypes.json#/definitions/Metric"
331330
},
332331
"description": "The value of the collection."
333332
}

0 commit comments

Comments
 (0)