-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hub Generated] Review request for Microsoft.AlertsManagement to add …
…version preview/2023-01-01-preview (#22248) * Adds base for updating Microsoft.AlertsManagement from version stable/2021-08-08 to version 2023-01-01-preview * Updates readme * Updates API version in new specs and examples * Add alertRuleRecommendations swagger file * Fix json * revert * revert * Fix json * Fix validations * Fixes * remove client thing * validation fixes * prettier fixes * Fix title * Delete error response definition * Fix version * Fix readme * separate methods * Fix pageble * Fix subscription level examples * Fix pageble * Fix readme * Fix readme file * Another try * Return list of recommendations * PR fixes * Add resource standard properties * Fix misplles * PR comments * Fix propreties definition name * flatten the properties --------- Co-authored-by: yashmuel <[email protected]> Co-authored-by: Meydan Dayan <[email protected]>
- Loading branch information
1 parent
78ec1b9
commit 90a294f
Showing
6 changed files
with
1,397 additions
and
0 deletions.
There are no files selected for viewing
329 changes: 329 additions & 0 deletions
329
...nager/Microsoft.AlertsManagement/preview/2023-01-01-preview/AlertRuleRecommendations.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,329 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "2023-01-01-preview", | ||
"title": "Azure Alerts Management Service Resource Provider", | ||
"description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"flow": "implicit", | ||
"description": "Azure Active Directory OAuth2 Flow", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/{resourceUri}/providers/Microsoft.AlertsManagement/alertRuleRecommendations": { | ||
"get": { | ||
"tags": [ | ||
"alertRuleRecommendations" | ||
], | ||
"description": "Retrieve alert rule recommendations for a resource.", | ||
"operationId": "AlertRuleRecommendations_ListByResource", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ResourceUriParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successful request for a list of alert rule recommendations", | ||
"schema": { | ||
"$ref": "#/definitions/AlertRuleRecommendationsListResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
}, | ||
"x-ms-examples": { | ||
"List alert rule recommendations for virtual machines at resource level": { | ||
"$ref": "./examples/AlertRuleRecommendations_GetByResource_VM.json" | ||
}, | ||
"List alert rule recommendations for Monitoring accounts at resource level": { | ||
"$ref": "./examples/AlertRuleRecommendations_GetByResource_MAC.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertRuleRecommendations": { | ||
"get": { | ||
"tags": [ | ||
"alertRuleRecommendations" | ||
], | ||
"description": "Retrieve alert rule recommendations for a target type.", | ||
"operationId": "AlertRuleRecommendations_ListByTargetType", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/TargetTypeParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successful request for a list of alert rule recommendations", | ||
"schema": { | ||
"$ref": "#/definitions/AlertRuleRecommendationsListResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
}, | ||
"x-ms-examples": { | ||
"List alert rule recommendations for virtual machines at subscription level": { | ||
"$ref": "./examples/AlertRuleRecommendations_GetBySubscription_VM.json" | ||
}, | ||
"List alert rule recommendations for Monitoring accounts at subscription level": { | ||
"$ref": "./examples/AlertRuleRecommendations_GetBySubscription_MAC.json" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"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 | ||
}, | ||
"TargetTypeParameter": { | ||
"name": "targetType", | ||
"in": "query", | ||
"required": true, | ||
"type": "string", | ||
"description": "The recommendations target type.", | ||
"x-ms-parameter-location": "client" | ||
} | ||
}, | ||
"definitions": { | ||
"AlertRuleRecommendationsListResponse": { | ||
"type": "object", | ||
"description": "List of alert rule recommendations.", | ||
"required": [ | ||
"value" | ||
], | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/AlertRuleRecommendationResource" | ||
}, | ||
"description": "the values for the alert rule recommendations." | ||
}, | ||
"nextLink": { | ||
"description": "URL to fetch the next set of recommendations.", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"AlertRuleRecommendationResource": { | ||
"type": "object", | ||
"description": "A single alert rule recommendation resource.", | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" | ||
} | ||
], | ||
"required": [ | ||
"properties" | ||
], | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/AlertRuleRecommendationProperties", | ||
"x-ms-client-flatten": true, | ||
"description": "recommendation properties." | ||
} | ||
} | ||
}, | ||
"AlertRuleRecommendationProperties": { | ||
"description": "Describes the format of Alert Rule Recommendations response.", | ||
"type": "object", | ||
"required": [ | ||
"alertRuleType", | ||
"displayInformation", | ||
"ruleArmTemplate" | ||
], | ||
"properties": { | ||
"alertRuleType": { | ||
"type": "string", | ||
"description": "The recommendation alert rule type." | ||
}, | ||
"displayInformation": { | ||
"$ref": "#/definitions/DisplayInformationItem" | ||
}, | ||
"ruleArmTemplate": { | ||
"$ref": "#/definitions/ruleArmTemplate" | ||
} | ||
} | ||
}, | ||
"DisplayInformationItem": { | ||
"description": "Provides the display information for an alert rule recommendation recommendations.", | ||
"type": "object", | ||
"properties": { | ||
"ruleInfo": { | ||
"type": "string", | ||
"description": "The alert rule information." | ||
}, | ||
"infoBallonMessage": { | ||
"type": "string", | ||
"description": "The information to display inside an information balloon." | ||
}, | ||
"infoBallonLink": { | ||
"type": "string", | ||
"description": "The documentation link to display inside an information balloon." | ||
}, | ||
"metricAlertsDisplayInformation": { | ||
"$ref": "#/definitions/MetricAlertsDisplayInformation" | ||
} | ||
} | ||
}, | ||
"MetricAlertsDisplayUnit": { | ||
"type": "string", | ||
"description": "The unit to display for a metric alert rule.", | ||
"enum": [ | ||
"None", | ||
"Percentage", | ||
"Bytes", | ||
"Kilobytes", | ||
"Megabytes", | ||
"Gigabytes", | ||
"Terabytes", | ||
"Petabytes", | ||
"BytesPerDay", | ||
"BytesPerHour", | ||
"BytesPerMinute", | ||
"BytesPerSecond", | ||
"KilobytesPerSecond", | ||
"MegabytesPerSecond", | ||
"GigabytesPerSecond", | ||
"TerabytesPerSecond", | ||
"PetabytesPerSecond", | ||
"Count", | ||
"Thousand", | ||
"Million", | ||
"Billion", | ||
"Trillion", | ||
"MicroSeconds", | ||
"MilliSeconds", | ||
"Seconds", | ||
"Minutes", | ||
"Hours", | ||
"Days", | ||
"CountPerDay", | ||
"CountPerHour", | ||
"CountPerMinute", | ||
"CountPerSecond", | ||
"ThousandPerSecond", | ||
"MillionPerSecond", | ||
"BillionPerSecond", | ||
"TrillionPerSecond" | ||
], | ||
"x-ms-enum": { | ||
"name": "MetricAlertsDisplayUnit", | ||
"modelAsString": true | ||
} | ||
}, | ||
"MetricAlertsDisplayInformation": { | ||
"description": "Provides display information specific for Metric Alerts rule.", | ||
"type": "object", | ||
"required": [ | ||
"metricDisplayName", | ||
"displayUnits" | ||
], | ||
"properties": { | ||
"metricDisplayName": { | ||
"type": "string", | ||
"description": "The metric display name to use in the UI for the metric alert rule." | ||
}, | ||
"displayUnits": { | ||
"$ref": "#/definitions/MetricAlertsDisplayUnit", | ||
"description": "The display units to use in the UI for the metric alert rule." | ||
} | ||
} | ||
}, | ||
"ruleArmTemplate": { | ||
"description": "A complete ARM template to deploy the alert rules.", | ||
"type": "object", | ||
"required": [ | ||
"$schema", | ||
"contentVersion", | ||
"variables", | ||
"parameters", | ||
"resources" | ||
], | ||
"properties": { | ||
"$schema": { | ||
"type": "string", | ||
"description": "JSON schema reference" | ||
}, | ||
"contentVersion": { | ||
"type": "string", | ||
"pattern": "(^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$)", | ||
"description": "A 4 number format for the version number of this template file. For example, 1.0.0.0" | ||
}, | ||
"variables": { | ||
"type": "object", | ||
"description": "Variable definitions" | ||
}, | ||
"parameters": { | ||
"type": "object", | ||
"description": "Input parameter definitions" | ||
}, | ||
"resources": { | ||
"type": "array", | ||
"description": "Alert rule resource definitions", | ||
"items": { | ||
"type": "object" | ||
}, | ||
"x-ms-identifiers": [] | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.