Skip to content

Commit

Permalink
Liran e alertsmanagement microsoft.alerts management 2024 03 01 previ…
Browse files Browse the repository at this point in the history
…ew (#27738)

* Adds base for updating Microsoft.AlertsManagement from version preview/2023-05-01-preview to version 2024-03-01-preview

* Updates readme

* Updates API version in new specs and examples

* API 2024-03-01-preview: CorrelationUpdates

* prettier check fix attempt

* Swagger SemanticValidation fix

* Swagger PrettierCheck fix

* added suppression for OperationsAPIImplementation

* 1. changed default package alertprocessingrules.json
2. other fixes to comments by the reviewer

* pr fixes

* indentation fix

* pr fixes

* fixed enum casing

---------

Co-authored-by: MIDDLEEAST\lienglender <[email protected]>
  • Loading branch information
Liran-E and MIDDLEEAST\lienglender authored May 15, 2024
1 parent fe6a0a3 commit 387c4e6
Show file tree
Hide file tree
Showing 15 changed files with 2,346 additions and 5 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"parameters": {
"api-version": "2024-03-01-preview",
"subscriptionId": "subId1",
"resourceGroupName": "alertscorrelationrg",
"alertProcessingRuleName": "AddActionGroupToSubscription",
"alertProcessingRule": {
"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,108 @@
{
"parameters": {
"api-version": "2024-03-01-preview",
"subscriptionId": "subId1",
"resourceGroupName": "alertscorrelationrg",
"alertProcessingRuleName": "CorrelateAlerts",
"alertProcessingRule": {
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"/subscriptions/subId1"
],
"actions": [
{
"actionType": "CorrelateAlerts",
"correlateBy": [
{
"field": "essentials.alertRule"
}
],
"correlationInterval": "PT30M",
"priority": 50,
"notificationsForCorrelatedAlerts": "SuppressAlways"
}
],
"description": "Correlate Alerts Example.",
"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": "CorrelateAlerts",
"correlateBy": [
{
"field": "essentials.alertRule"
}
],
"correlationInterval": "PT30M",
"priority": 50,
"notificationsForCorrelatedAlerts": "SuppressAlways"
}
],
"description": "Correlate Alerts Example.",
"enabled": true
},
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/CorrelateAlerts",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "CorrelateAlerts",
"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": "CorrelateAlerts",
"correlateBy": [
{
"field": "essentials.alertRule"
}
],
"correlationInterval": "PT30M",
"priority": 50,
"notificationsForCorrelatedAlerts": "SuppressAlways"
}
],
"description": "Correlate Alerts Example.",
"enabled": true
},
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/CorrelateAlerts",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "CorrelateAlerts",
"location": "Global",
"tags": {}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"parameters": {
"api-version": "2024-03-01-preview",
"subscriptionId": "subId1",
"resourceGroupName": "alertscorrelationrg",
"alertProcessingRuleName": "CorrelateAlerts",
"alertProcessingRule": {
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"/subscriptions/subId1"
],
"actions": [
{
"actionType": "CorrelateAlerts",
"correlateBy": [
{
"field": "essentials.alertRule"
}
],
"correlationInterval": "PT30M",
"priority": 50,
"notificationsForCorrelatedAlerts": "SuppressAlways",
"correlationUpdates": {
"updateType": "timeBased",
"updateInterval": "PT15M",
"actionGroups": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1",
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2"
]
}
}
],
"description": "Correlate Alerts Example.",
"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": "CorrelateAlerts",
"correlateBy": [
{
"field": "essentials.alertRule"
}
],
"correlationInterval": "PT30M",
"priority": 50,
"notificationsForCorrelatedAlerts": "SuppressAlways",
"correlationUpdates": {
"updateType": "timeBased",
"updateInterval": "PT15M",
"actionGroups": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1",
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2"
]
}
}
],
"description": "Correlate Alerts Example.",
"enabled": true
},
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/CorrelateAlerts",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "CorrelateAlerts",
"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": "CorrelateAlerts",
"correlateBy": [
{
"field": "essentials.alertRule"
}
],
"correlationInterval": "PT30M",
"priority": 50,
"notificationsForCorrelatedAlerts": "SuppressAlways",
"correlationUpdates": {
"updateType": "timeBased",
"updateInterval": "PT15M",
"actionGroups": [
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1",
"/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2"
]
}
}
],
"description": "Correlate Alerts Example.",
"enabled": true
},
"id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/CorrelateAlerts",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "CorrelateAlerts",
"location": "Global",
"tags": {}
}
}
}
}
Loading

0 comments on commit 387c4e6

Please sign in to comment.