-
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-05-01-privatepreview (#23601) * Adds base for updating Microsoft.AlertsManagement from version stable/2021-08-08 to version 2023-05-01-privatepreview * Updates readme * Updates API version in new specs and examples * added correlation example * Updated the example according to the discussion. * Continue after discussion * Removed targe region * Removed the target region * Modified correlationInterval * Fixed after a review. * Fixed file path * removed 'private' from apiversion * cont * fixed model validation * cont * Cont. * run prettier * Added "x-ms-identifiers" * Fixed avocade * fixed readme * fixed avocado * Continue * updated readmy * Modified "SuppressAll" to "SuppressAlways"
- Loading branch information
Showing
14 changed files
with
2,173 additions
and
1 deletion.
There are no files selected for viewing
871 changes: 871 additions & 0 deletions
871
...e-manager/Microsoft.AlertsManagement/preview/2023-05-01-preview/AlertProcessingRules.json
Large diffs are not rendered by default.
Oops, something went wrong.
93 changes: 93 additions & 0 deletions
93
...es/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.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,93 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-05-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": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2021-02-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"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": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2021-02-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"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": {} | ||
} | ||
} | ||
} | ||
} |
108 changes: 108 additions & 0 deletions
108
...ew/2023-05-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation.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,108 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-05-01-preview", | ||
"subscriptionId": "subId1", | ||
"resourceGroupName": "alertscorrelationrg", | ||
"alertProcessingRuleName": "CorrelateAlerts", | ||
"alertProcessingRule": { | ||
"location": "Global", | ||
"tags": {}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1" | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "CorrelateAlerts", | ||
"correlateBy": [ | ||
{ | ||
"field": "essentials.alertRule" | ||
} | ||
], | ||
"correlationInterval": "00:30:00", | ||
"priority": 50, | ||
"notificationsForCorrelatedAlerts": "SuppressAlways" | ||
} | ||
], | ||
"description": "Correlate Alerts Example.", | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"systemData": { | ||
"createdBy": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2021-02-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2021-02-13T16:15:34Z" | ||
}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1" | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "CorrelateAlerts", | ||
"correlateBy": [ | ||
{ | ||
"field": "essentials.alertRule" | ||
} | ||
], | ||
"correlationInterval": "00:30:00", | ||
"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": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2021-02-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2021-02-13T16:15:34Z" | ||
}, | ||
"properties": { | ||
"scopes": [ | ||
"/subscriptions/subId1" | ||
], | ||
"actions": [ | ||
{ | ||
"actionType": "CorrelateAlerts", | ||
"correlateBy": [ | ||
{ | ||
"field": "essentials.alertRule" | ||
} | ||
], | ||
"correlationInterval": "00:30:00", | ||
"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": {} | ||
} | ||
} | ||
} | ||
} |
129 changes: 129 additions & 0 deletions
129
...essingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.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,129 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-05-01-preview", | ||
"subscriptionId": "subId1", | ||
"resourceGroupName": "alertscorrelationrg", | ||
"alertProcessingRuleName": "AddActionGroupsBySeverity", | ||
"alertProcessingRule": { | ||
"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": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2018-06-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"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": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2018-06-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"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": {} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.