Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9f40361
Adds base for updating Microsoft.AlertsManagement from version stable…
yashmuel Jan 19, 2023
66943c1
Updates readme
yashmuel Jan 19, 2023
0fd8ec3
Updates API version in new specs and examples
yashmuel Jan 19, 2023
76e28e4
Add alertRuleRecommendations swagger file
meday89 Jan 19, 2023
f26cbfd
Fix json
meday89 Jan 19, 2023
6d27328
revert
meday89 Jan 19, 2023
ad33ca6
revert
meday89 Jan 19, 2023
0073bbd
Fix json
meday89 Jan 19, 2023
646b736
Fix validations
meday89 Jan 19, 2023
7455f25
Fixes
meday89 Jan 19, 2023
b0cf5f0
remove client thing
meday89 Jan 19, 2023
56f352c
validation fixes
meday89 Jan 19, 2023
cf6d1ba
prettier fixes
meday89 Jan 19, 2023
09ecd8f
Fix title
meday89 Jan 19, 2023
7c36b06
Delete error response definition
meday89 Jan 19, 2023
7c8b35e
Fix version
meday89 Jan 19, 2023
ef730cc
Fix readme
meday89 Jan 19, 2023
8736872
separate methods
meday89 Jan 20, 2023
ac37fb0
Fix pageble
meday89 Jan 20, 2023
2138ccb
Fix subscription level examples
meday89 Jan 20, 2023
b1f0915
Fix pageble
meday89 Jan 22, 2023
3679563
Fix readme
meday89 Jan 22, 2023
2652aea
Fix readme file
meday89 Jan 22, 2023
e0a2fcb
Another try
meday89 Jan 22, 2023
2852f63
Return list of recommendations
meday89 Jan 26, 2023
19cfdde
PR fixes
meday89 Jan 26, 2023
a5d4ec4
Add resource standard properties
meday89 Jan 27, 2023
5cc9dbc
Fix misplles
meday89 Jan 27, 2023
068b6c8
PR comments
meday89 Jan 27, 2023
4b19875
Fix propreties definition name
meday89 Jan 27, 2023
9a28187
flatten the properties
meday89 Jan 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": {
Copy link
Copy Markdown
Contributor

@visingla-ms visingla-ms Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TargetTypeParameter

Can this be an enum? Like is there a pre-defined list of target types? #Resolved

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this case - the value can be any resource type or a target scenario like 'AzureBackup'.

"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": []
}
}
}
}
}
Loading