-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Hub Generated] Review request for Microsoft.Insights to add version stable/2023-10-01 #26655
Merged
visingla-ms
merged 16 commits into
main
from
ToddKingMSFT-monitor-Microsoft.Insights-2023-10-01-DpAndARM
Dec 8, 2023
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
02be594
Adds base for updating Microsoft.Insights from version preview/2023-0…
ToddKingMSFT 9d9eab9
Updates readme
ToddKingMSFT a33800e
Updates API version in new specs and examples
ToddKingMSFT 896f2cb
Introduce the new 2023-10-01 metrics API versions
ToddKingMSFT 6e23336
Update
ToddKingMSFT 58c52d1
Fix avacado
ToddKingMSFT c6d1ab3
Fix up examples and body parameters
ToddKingMSFT 57793c3
Fix example formatting
ToddKingMSFT 0cd4f6b
Remove paging
ToddKingMSFT 51e6252
Fix prettier formatting and suppress lint rules that would cause a br…
ToddKingMSFT b755ad5
Make changes requested by stewardship board
ToddKingMSFT a5c42f1
update batch examples
ToddKingMSFT 13dc50d
Add x-ms-pageable back in
ToddKingMSFT 97953bc
Update description
ToddKingMSFT 52e684d
Just use the existing 2015-04-01 operations API all past APIs used.
ToddKingMSFT b9216f2
use ErrorResponse from common-types v1 for APIs with legacy error res…
ToddKingMSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
338 changes: 338 additions & 0 deletions
338
specification/monitor/common-types/v2/commonMonitoringTypes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,338 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "2.0", | ||
"title": "Common Monitoring types" | ||
}, | ||
"paths": {}, | ||
"definitions": { | ||
"LocalizableString": { | ||
"type": "object", | ||
"required": [ | ||
"value" | ||
], | ||
"properties": { | ||
"value": { | ||
"type": "string", | ||
"description": "The invariant value." | ||
}, | ||
"localizedValue": { | ||
"type": "string", | ||
"description": "The display name." | ||
} | ||
}, | ||
"description": "The localizable string class." | ||
}, | ||
"MetricValue": { | ||
"type": "object", | ||
"required": [ | ||
"timeStamp" | ||
], | ||
"properties": { | ||
"timeStamp": { | ||
"type": "string", | ||
"format": "date-time", | ||
"description": "The timestamp for the metric value in ISO 8601 format." | ||
}, | ||
"average": { | ||
"type": "number", | ||
"format": "double", | ||
"description": "The average value in the time range." | ||
}, | ||
"minimum": { | ||
"type": "number", | ||
"format": "double", | ||
"description": "The least value in the time range." | ||
}, | ||
"maximum": { | ||
"type": "number", | ||
"format": "double", | ||
"description": "The greatest value in the time range." | ||
}, | ||
"total": { | ||
"type": "number", | ||
"format": "double", | ||
"description": "The sum of all of the values in the time range." | ||
}, | ||
"count": { | ||
"type": "number", | ||
"format": "double", | ||
"description": "The number of samples in the time range. Can be used to determine the number of values that contributed to the average value." | ||
} | ||
}, | ||
"description": "Represents a metric value." | ||
}, | ||
"MetadataValue": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"$ref": "#/definitions/LocalizableString", | ||
"description": "The name of the metadata." | ||
}, | ||
"value": { | ||
"type": "string", | ||
"description": "The value of the metadata." | ||
} | ||
}, | ||
"description": "Represents a metric metadata value." | ||
}, | ||
"Unit": { | ||
"type": "string", | ||
"description": "The unit of the metric.", | ||
"enum": [ | ||
"Count", | ||
"Bytes", | ||
"Seconds", | ||
"CountPerSecond", | ||
"BytesPerSecond", | ||
"Percent", | ||
"MilliSeconds", | ||
"ByteSeconds", | ||
"Unspecified", | ||
"Cores", | ||
"MilliCores", | ||
"NanoCores", | ||
"BitsPerSecond" | ||
], | ||
"x-ms-enum": { | ||
"name": "MetricUnit", | ||
"modelAsString": true, | ||
"values": [ | ||
{ | ||
"value": "Count", | ||
"description": "Unit of raw quantity." | ||
}, | ||
{ | ||
"value": "Bytes", | ||
"description": "Unit of memory in bytes." | ||
}, | ||
{ | ||
"value": "Seconds", | ||
"description": "Unit of time in seconds." | ||
}, | ||
{ | ||
"value": "CountPerSecond", | ||
"description": "Rate unit of raw quantity per second." | ||
}, | ||
{ | ||
"value": "BytesPerSecond", | ||
"description": "Rate unit of memory in bytes per second." | ||
}, | ||
{ | ||
"value": "Percent", | ||
"description": "Percentage unit." | ||
}, | ||
{ | ||
"value": "MilliSeconds", | ||
"description": "Unit of time in 1/1000th of a second." | ||
}, | ||
{ | ||
"value": "ByteSeconds", | ||
"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." | ||
}, | ||
{ | ||
"value": "Unspecified", | ||
"description": "No specified unit." | ||
}, | ||
{ | ||
"value": "Cores", | ||
"description": "Unit of processing power." | ||
}, | ||
{ | ||
"value": "MilliCores", | ||
"description": "Unit of processing power in 1/1000th of a CPU core." | ||
}, | ||
{ | ||
"value": "NanoCores", | ||
"description": "Unit of processing power in one billionth of a CPU core." | ||
}, | ||
{ | ||
"value": "BitsPerSecond", | ||
"description": "Rate unit of binary digits per second." | ||
} | ||
] | ||
} | ||
}, | ||
"TimeSeriesElement": { | ||
"type": "object", | ||
"properties": { | ||
"metadatavalues": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/MetadataValue" | ||
}, | ||
"x-ms-identifiers": [ | ||
"name" | ||
], | ||
"description": "The metadata values returned if $filter was specified in the call." | ||
}, | ||
"data": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/MetricValue" | ||
}, | ||
"x-ms-identifiers": [ | ||
"timeStamp" | ||
], | ||
"description": "An array of data points representing the metric values. This is only returned if a result type of data is specified." | ||
} | ||
}, | ||
"description": "A time series result type. The discriminator value is always TimeSeries in this case." | ||
}, | ||
"Metric": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "The metric Id." | ||
}, | ||
"type": { | ||
"type": "string", | ||
"description": "The resource type of the metric resource." | ||
}, | ||
"name": { | ||
"$ref": "#/definitions/LocalizableString", | ||
"description": "The name and the display name of the metric, i.e. it is localizable string." | ||
}, | ||
"displayDescription": { | ||
"type": "string", | ||
"description": "Detailed description of this metric." | ||
}, | ||
"errorCode": { | ||
"type": "string", | ||
"description": "'Success' or the error details on query failures for this metric." | ||
}, | ||
"errorMessage": { | ||
"type": "string", | ||
"description": "Error message encountered querying this specific metric." | ||
}, | ||
"unit": { | ||
"$ref": "#/definitions/Unit", | ||
"description": "The unit of the metric." | ||
}, | ||
"timeseries": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/TimeSeriesElement" | ||
}, | ||
"x-ms-identifiers": [], | ||
"description": "The time series returned when a data query is performed." | ||
} | ||
}, | ||
"required": [ | ||
"id", | ||
"type", | ||
"name", | ||
"unit", | ||
"timeseries" | ||
], | ||
"description": "The result data of a query." | ||
}, | ||
"ErrorContract": { | ||
"title": "Error Response", | ||
"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.)", | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"description": "The error object.", | ||
"$ref": "#/definitions/ErrorResponse" | ||
} | ||
} | ||
}, | ||
"ErrorResponse": { | ||
"description": "Describes the format of Error response.", | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"description": "Error code", | ||
"type": "string" | ||
}, | ||
"message": { | ||
"description": "Error message indicating why the operation failed.", | ||
"type": "string" | ||
}, | ||
"target": { | ||
"type": "string", | ||
"description": "The error target." | ||
}, | ||
"additionalInfo": { | ||
"description": "Additional information about the error", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"description": "The type of the info property (e.g. string).", | ||
"type": "string" | ||
}, | ||
"info": { | ||
"description": "Additional information related to the error.", | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
"ResourceUriParameter": { | ||
"name": "resourceUri", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The identifier of the resource.", | ||
"x-ms-parameter-location": "method", | ||
"x-ms-skip-url-encoding": true | ||
}, | ||
"RegionParameter": { | ||
"name": "region", | ||
"in": "query", | ||
"required": true, | ||
"type": "string", | ||
"description": "The region where the metrics you want reside.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"MetricNamespaceParameter": { | ||
"name": "metricnamespace", | ||
"in": "query", | ||
"required": false, | ||
"type": "string", | ||
"description": "Metric namespace where the metrics you want reside.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"AggregationsParameter": { | ||
"name": "aggregation", | ||
"in": "query", | ||
"required": false, | ||
"type": "string", | ||
"description": "The list of aggregation types (comma separated) to retrieve.\n*Examples: average, minimum, maximum*", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"TopParameter": { | ||
"name": "top", | ||
"in": "query", | ||
"required": false, | ||
"type": "integer", | ||
"format": "int32", | ||
"description": "The maximum number of records to retrieve per resource ID in the request.\nValid only if filter is specified.\nDefaults to 10.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"OrderByParameter": { | ||
"name": "orderby", | ||
"in": "query", | ||
"required": false, | ||
"type": "string", | ||
"description": "The aggregation to use for sorting results and the direction of the sort.\nOnly one order can be specified.\n*Examples: sum asc*", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"RollUpByParameter": { | ||
"name": "rollupby", | ||
"in": "query", | ||
"required": false, | ||
"type": "string", | ||
"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.", | ||
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the common type Error Response?
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/common-types/resource-management/v5/types.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is there are a bunch of APIs that are stuck with the old v1 error response that had everything in the root intead of nested in a "error" object like v2 and above. I can't use v5 as that would be a breaking change.
What I could do I think is use the old v1 ErrorResponse instead though.