Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.Insights to add version …
Browse files Browse the repository at this point in the history
…stable/2020-10-01 (#11579)

* Adds base for updating Microsoft.Insights from version stable/2017-04-01 to version 2020-10-01

* Updates readme

* Updates API version in new specs and examples

* Removed API related to ActionGroup from the new api-version

* Implemented new api-version

* Added more exmamples and renamed them

* Adds suppression to readme

* Adds suppression to readme

* Adds suppression to readme

* Ran prettier

* Reverted error response to match previous one, to not intoduce breaking change

* Added suppression for error response

* Fixed error response suppression

* Ran prettier + improved error response suppression

* Reverted ALA API operationIds so it won't be a breaking change for Python

* Reverted parameter + definition names to no be breaking change

* Fixed examples according to parameters and defs revert

* Checking push

* Reverting Inbal's merge today

* Fixing "The example JSON file is not referenced from the swagger file."

* Adding to readme.azureresourceschema.md

* fixing python package

* Reverting last commit

* Fixing python readme

Co-authored-by: Natalie Polishuk 🦝 <napolish@microsoft.com>
  • Loading branch information
InbalZim and napolish authored Feb 10, 2021
1 parent 88406f2 commit b5667f3
Show file tree
Hide file tree
Showing 13 changed files with 1,322 additions and 78 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"parameters": {
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"resourceGroupName": "MyResourceGroup",
"activityLogAlertName": "SampleActivityLogAlertRule",
"api-version": "2020-10-01",
"activityLogAlertRule": {
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"/subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "Administrative"
},
{
"field": "level",
"equals": "Error"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule."
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule",
"type": "Microsoft.Insights/ActivityLogAlerts",
"name": "SampleActivityLogAlertRule",
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "Category",
"equals": "Administrative"
},
{
"field": "Level",
"equals": "Error"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule."
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule",
"type": "Microsoft.Insights/ActivityLogAlerts",
"name": "SampleActivityLogAlertRule",
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "Category",
"equals": "Administrative"
},
{
"field": "Level",
"equals": "Error"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule."
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"parameters": {
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"resourceGroupName": "MyResourceGroup",
"activityLogAlertName": "SampleActivityLogAlertRuleWithAnyOfCondition",
"api-version": "2020-10-01",
"activityLogAlertRule": {
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
},
{
"anyOf": [
{
"field": "properties.incidentType",
"equals": "Incident"
},
{
"field": "properties.incidentType",
"equals": "Maintenance"
}
]
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule with 'anyOf' condition."
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithAnyOfCondition",
"type": "Microsoft.Insights/ActivityLogAlerts",
"name": "SampleActivityLogAlertRuleWithAnyOfCondition",
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
},
{
"anyOf": [
{
"field": "properties.incidentType",
"equals": "Incident"
},
{
"field": "properties.incidentType",
"equals": "Maintenance"
}
]
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule with 'anyOf' condition."
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithAnyOfCondition",
"type": "Microsoft.Insights/ActivityLogAlerts",
"name": "SampleActivityLogAlertRuleWithAnyOfCondition",
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
},
{
"anyOf": [
{
"field": "properties.incidentType",
"equals": "Incident"
},
{
"field": "properties.incidentType",
"equals": "Maintenance"
}
]
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule with 'anyOf' condition."
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"parameters": {
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"resourceGroupName": "MyResourceGroup",
"activityLogAlertName": "SampleActivityLogAlertRuleWithContainsAny",
"api-version": "2020-10-01",
"activityLogAlertRule": {
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
},
{
"field": "properties.impactedServices[*].ImpactedRegions[*].RegionName",
"containsAny": [
"North Europe",
"West Europe"
]
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule with 'containsAny'."
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithContainsAny",
"type": "Microsoft.Insights/ActivityLogAlerts",
"name": "SampleActivityLogAlertRuleWithContainsAny",
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
},
{
"field": "properties.impactedServices[*].ImpactedRegions[*].RegionName",
"containsAny": [
"North Europe",
"West Europe"
]
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule with 'containsAny'."
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithContainsAny",
"type": "Microsoft.Insights/ActivityLogAlerts",
"name": "SampleActivityLogAlertRuleWithContainsAny",
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
},
{
"field": "properties.impactedServices[*].ImpactedRegions[*].RegionName",
"containsAny": [
"North Europe",
"West Europe"
]
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert rule with 'containsAny'."
}
}
}
}
}
Loading

0 comments on commit b5667f3

Please sign in to comment.