Skip to content

Commit

Permalink
[Hub Generated] Public private branch 'dev-alertsmanagement-Microsoft…
Browse files Browse the repository at this point in the history
….AlertsManagement-2021-02-01-preview' (Azure#15899)

* Adds base for updating Microsoft.AlertsManagement from version preview/2019-05-05-preview to version 2021-02-01-preview

* Updates readme

* Updates API version in new specs and examples

* update action rule schema to new api

* fix linter issues

* add alertsmanagement.json

* fix api version

* fix description in targetResource

* match description

* match severity description

* use systemdata type

* run prettier-fix

* change alertsmanagement to latest version

* add integer format

* add x-ms-discriminator-value

* remove summary

* make action polymorphic

* update readme

* prettier fix

* remove space

* add examples

* prettier fix

* fix validation errors

* fix validation errors

* change file name

* update monitor service names

* fix PR comments

* fix description

* change actions to array

* fix prettify issue

* fix lintDiff errors

* rename schedulingConfig to schedule

* fix response codes for put and delete

* fix prettier

* remove query params

* add enabled default value

* rename api version and add severity to conditions

* fix condition enum and remove Z from time in examples

* update conditions, schedule pattern and descriptions
  • Loading branch information
inballeibovitch authored and LeiWang3 committed Mar 31, 2022
1 parent a18974f commit 55fa02d
Show file tree
Hide file tree
Showing 14 changed files with 2,134 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"swagger": "2.0",
"info": {
"version": "2021-08-08-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"
],
"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": {
"/providers/Microsoft.AlertsManagement/operations": {
"get": {
"operationId": "Operations_List",
"description": "List all operations available through Azure Alerts Management Resource Provider.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK. Successfully retrieved operations list.",
"schema": {
"$ref": "#/definitions/operationsList"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
"operation": {
"description": "Operation provided by provider",
"properties": {
"name": {
"type": "string",
"description": "Name of the operation"
},
"display": {
"type": "object",
"description": "Properties of the operation",
"properties": {
"provider": {
"type": "string",
"description": "Provider name"
},
"resource": {
"type": "string",
"description": "Resource name"
},
"operation": {
"type": "string",
"description": "Operation name"
},
"description": {
"type": "string",
"description": "Description of the operation"
}
}
}
}
},
"operationsList": {
"description": "Lists the operations available in the AlertsManagement RP.",
"properties": {
"nextLink": {
"description": "URL to fetch the next set of operations.",
"type": "string"
},
"value": {
"description": "Array of operations",
"type": "array",
"items": {
"$ref": "#/definitions/operation"
}
}
},
"required": [
"value"
]
}
},
"parameters": {
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Client Api Version."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"parameters": {
"api-version": "2021-08-08-preview",
"subscriptionId": "subId1",
"resourceGroupName": "alertscorrelationrg",
"actionRuleName": "AddActionGroupToSubscription",
"actionRule": {
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"/subscriptions/subId1"
],
"actions": [
{
"actionType": "AddActionGroups",
"actionGroupIds": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1"
]
}
],
"description": "Add ActionGroup1 to all alerts in the subscription",
"enabled": true
}
}
},
"responses": {
"200": {
"body": {
"systemData": {
"createdBy": "[email protected]",
"createdByType": "User",
"createdAt": "2021-02-12T22:05:09Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-02-13T16:15:34Z"
},
"properties": {
"scopes": [
"/subscriptions/subId1"
],
"actions": [
{
"actionType": "AddActionGroups",
"actionGroupIds": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1"
]
}
],
"description": "Add ActionGroup1 to all alerts in the subscription",
"enabled": true
},
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "AddActionGroupToSubscription",
"location": "Global",
"tags": {}
}
},
"201": {
"body": {
"systemData": {
"createdBy": "[email protected]",
"createdByType": "User",
"createdAt": "2021-02-12T22:05:09Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-02-13T16:15:34Z"
},
"properties": {
"scopes": [
"/subscriptions/subId1"
],
"actions": [
{
"actionType": "AddActionGroups",
"actionGroupIds": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1"
]
}
],
"description": "Add ActionGroup1 to all alerts in the subscription",
"enabled": true
},
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "AddActionGroupToSubscription",
"location": "Global",
"tags": {}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"parameters": {
"api-version": "2021-08-08-preview",
"subscriptionId": "subId1",
"resourceGroupName": "alertscorrelationrg",
"actionRuleName": "AddActionGroupsBySeverity",
"actionRule": {
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"/subscriptions/subId1/resourceGroups/RGId1",
"/subscriptions/subId1/resourceGroups/RGId2"
],
"conditions": [
{
"field": "Severity",
"operator": "Equals",
"values": [
"sev0",
"sev1"
]
}
],
"actions": [
{
"actionType": "AddActionGroups",
"actionGroupIds": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1",
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2"
]
}
],
"description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups",
"enabled": true
}
}
},
"responses": {
"200": {
"body": {
"systemData": {
"createdBy": "[email protected]",
"createdByType": "User",
"createdAt": "2018-06-12T22:05:09Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User",
"lastModifiedAt": "2018-06-13T22:05:09Z"
},
"properties": {
"scopes": [
"/subscriptions/subId1/resourceGroups/RGId1",
"/subscriptions/subId1/resourceGroups/RGId2"
],
"conditions": [
{
"field": "Severity",
"operator": "Equals",
"values": [
"sev0",
"sev1"
]
}
],
"actions": [
{
"actionType": "AddActionGroups",
"actionGroupIds": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1",
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2"
]
}
],
"description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups",
"enabled": true
},
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "AddActionGroupsBySeverity",
"location": "Global",
"tags": {}
}
},
"201": {
"body": {
"systemData": {
"createdBy": "[email protected]",
"createdByType": "User",
"createdAt": "2018-06-12T22:05:09Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByType": "User",
"lastModifiedAt": "2018-06-13T22:05:09Z"
},
"properties": {
"scopes": [
"/subscriptions/subId1/resourceGroups/RGId1",
"/subscriptions/subId1/resourceGroups/RGId2"
],
"conditions": [
{
"field": "Severity",
"operator": "Equals",
"values": [
"sev0",
"sev1"
]
}
],
"actions": [
{
"actionType": "AddActionGroups",
"actionGroupIds": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1",
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2"
]
}
],
"description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups",
"enabled": true
},
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "AddActionGroupsBySeverity",
"location": "Global",
"tags": {}
}
}
}
}
Loading

0 comments on commit 55fa02d

Please sign in to comment.