Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.AlertsManagement to add …
Browse files Browse the repository at this point in the history
…version preview/2023-04-01-preview (#22849)

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

* Updates readme

* Updates API version in new specs and examples

* Add TenantActivityLogAlerts Resource type

* Prettier

* Align with ALA

* Fix issues

* Prettier

* Fix param

* fix PR comments

---------

Co-authored-by: meydand <t-meday@microsoft.com>
Co-authored-by: Meydan Dayan <meday@microsoft.com>
  • Loading branch information
3 people authored Mar 23, 2023
1 parent 2d707db commit c23c230
Show file tree
Hide file tree
Showing 8 changed files with 889 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"parameters": {
"managementGroupName": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"alertRuleName": "SampleActivityLogAlertSHRuleOnTenantLevel",
"api-version": "2023-04-01-preview",
"tenantActivityLogAlertRule": {
"location": "Global",
"tags": {},
"properties": {
"tenantScope": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
},
"actionProperties": {
"Email.Title": "my email title"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert service health rule on tenant level events."
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.AlertsManagement/TenantActivityLogAlerts/SampleActivityLogAlertSHRuleOnTenantLevel",
"type": "Microsoft.AlertsManagement/TenantActivityLogAlerts",
"name": "SampleActivityLogAlertSHRuleOnTenantLevel",
"location": "Global",
"tags": {},
"properties": {
"tenantScope": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
},
"actionProperties": {
"Email.Title": "my email title"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert service health rule on tenant level events."
}
}
},
"201": {
"headers": {},
"body": {
"id": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.AlertsManagement/TenantActivityLogAlerts/SampleActivityLogAlertSHRuleOnTenantLevel",
"type": "Microsoft.AlertsManagement/TenantActivityLogAlerts",
"name": "SampleActivityLogAlertSHRuleOnTenantLevel",
"location": "Global",
"tags": {},
"properties": {
"tenantScope": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
},
"actionProperties": {
"Email.Title": "my email title"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert service health rule on tenant level events."
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"managementGroupName": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"alertRuleName": "SampleActivityLogAlertSHRuleOnTenantLevel",
"api-version": "2023-04-01-preview"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"managementGroupName": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"alertRuleName": "SampleActivityLogAlertSHRuleOnTenantLevel",
"api-version": "2023-04-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.AlertsManagement/TenantActivityLogAlerts/SampleActivityLogAlertSHRuleOnTenantLevel",
"type": "Microsoft.AlertsManagement/TenantActivityLogAlerts",
"name": "SampleActivityLogAlertSHRuleOnTenantLevel",
"location": "Global",
"tags": {},
"properties": {
"tenantScope": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
},
"actionProperties": {
"Email.Title": "my email title"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert service health rule on tenant level events."
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"parameters": {
"managementGroupName": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"api-version": "2023-04-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"id": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.AlertsManagement/TenantActivityLogAlerts/SampleActivityLogAlertSHRuleOnTenantLevel",
"type": "Microsoft.AlertsManagement/TenantActivityLogAlerts",
"name": "SampleActivityLogAlertSHRuleOnTenantLevel",
"location": "Global",
"tags": {},
"properties": {
"tenantScope": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
},
"actionProperties": {
"Email.Title": "my email title"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert service health rule on tenant level events."
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"parameters": {
"api-version": "2023-04-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"id": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.AlertsManagement/TenantActivityLogAlerts/SampleActivityLogAlertSHRuleOnTenantLevel",
"type": "Microsoft.AlertsManagement/TenantActivityLogAlerts",
"name": "SampleActivityLogAlertSHRuleOnTenantLevel",
"location": "Global",
"tags": {},
"properties": {
"tenantScope": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
},
"actionProperties": {
"Email.Title": "my email title"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert service health rule on tenant level events."
}
},
{
"id": "/providers/Microsoft.Management/ManagementGroups/MyManagementGroup/providers/Microsoft.AlertsManagement/TenantActivityLogAlerts/SampleActivityLogAlertSHRuleOnTenantLevel",
"type": "Microsoft.AlertsManagement/TenantActivityLogAlerts",
"name": "SampleActivityLogAlertSHRuleOnTenantLevel",
"location": "Global",
"tags": {},
"properties": {
"tenantScope": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/providers/Microsoft.Management/ManagementGroups/MyManagementGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
},
"actionProperties": {
"Email.Title": "my email title"
}
}
]
},
"enabled": true,
"description": "Description of sample Activity Log Alert service health rule on tenant level events."
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"parameters": {
"managementGroupName": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"alertRuleName": "SampleActivityLogAlertSHRuleOnTenantLevel",
"api-version": "2023-04-01-preview",
"tenantActivityLogAlertRulePatch": {
"tags": {
"key1": "value1",
"key2": "value2"
},
"properties": {
"enabled": false
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.AlertsManagement/TenantActivityLogAlerts/SampleActivityLogAlertSHRuleOnTenantLevel",
"type": "Microsoft.AlertsManagement/TenantActivityLogAlerts",
"name": "SampleActivityLogAlertSHRuleOnTenantLevel",
"location": "Global",
"tags": {
"key1": "value1",
"key2": "value2"
},
"properties": {
"tenantScope": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"condition": {
"allOf": [
{
"field": "category",
"equals": "ServiceHealth"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/providers/Microsoft.Management/ManagementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
"webhookProperties": {
"sampleWebhookProperty": "SamplePropertyValue"
},
"actionProperties": {
"Email.Title": "my email title"
}
}
]
},
"enabled": false,
"description": "Description of sample Activity Log Alert service health rule on tenant level events."
}
}
}
}
}
10 changes: 10 additions & 0 deletions specification/alertsmanagement/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ openapi-type: arm
tag: package-2023-03
```
### Tag: package-preview-2023-04
These settings apply only when `--tag=package-preview-2023-04` is specified on the command line.

```yaml $(tag) == 'package-preview-2023-04'
input-file:
- Microsoft.AlertsManagement/preview/2023-04-01-preview/TenantActivityLogAlerts.json
```
### Tag: package-preview-2023-01

These settings apply only when `--tag=package-preview-2023-01` is specified on the command line.
Expand Down Expand Up @@ -77,6 +86,7 @@ input-file:
- Microsoft.AlertsManagement/preview/2019-05-05-preview/AlertsManagement.json
- Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json
- Microsoft.AlertsManagement/preview/2023-01-01-preview/AlertRuleRecommendations.json
- Microsoft.AlertsManagement/preview/2023-04-01-preview/TenantActivityLogAlerts.json
```

### Tag: package-preview-2021-08
Expand Down

0 comments on commit c23c230

Please sign in to comment.