Skip to content

Commit 100f2b1

Browse files
[Hub Generated] Review request for Microsoft.Insights to add version preview/2023-01-01-preview (#22575)
* Adds base for updating Microsoft.Insights from version stable/2020-10-01 to version 2023-01-01-preview * Updates readme * Updates API version in new specs and examples * added tenant scope in the new ALA api version * updated tenant level service health rule example * fixed linter errors * added "actionProperties" to the api and examples * fix prettier. added object types. typo fix --------- Co-authored-by: Gregory Chris <[email protected]>
1 parent a542631 commit 100f2b1

11 files changed

+1427
-1
lines changed

specification/monitor/resource-manager/Microsoft.Insights/preview/2023-01-01-preview/activityLogAlerts_API.json

Lines changed: 570 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
4+
"resourceGroupName": "MyResourceGroup",
5+
"activityLogAlertName": "SampleActivityLogAlertRule",
6+
"api-version": "2023-01-01-preview",
7+
"activityLogAlertRule": {
8+
"location": "Global",
9+
"tags": {},
10+
"properties": {
11+
"scopes": [
12+
"/subscriptions/187f412d-1758-44d9-b052-169e2564721d"
13+
],
14+
"condition": {
15+
"allOf": [
16+
{
17+
"field": "category",
18+
"equals": "Administrative"
19+
},
20+
{
21+
"field": "level",
22+
"equals": "Error"
23+
}
24+
]
25+
},
26+
"actions": {
27+
"actionGroups": [
28+
{
29+
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
30+
"webhookProperties": {
31+
"sampleWebhookProperty": "SamplePropertyValue"
32+
},
33+
"actionProperties": {
34+
"Email.Title": "my email title"
35+
}
36+
}
37+
]
38+
},
39+
"enabled": true,
40+
"description": "Description of sample Activity Log Alert rule."
41+
}
42+
}
43+
},
44+
"responses": {
45+
"200": {
46+
"headers": {},
47+
"body": {
48+
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule",
49+
"type": "Microsoft.Insights/ActivityLogAlerts",
50+
"name": "SampleActivityLogAlertRule",
51+
"location": "Global",
52+
"tags": {},
53+
"properties": {
54+
"scopes": [
55+
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
56+
],
57+
"condition": {
58+
"allOf": [
59+
{
60+
"field": "Category",
61+
"equals": "Administrative"
62+
},
63+
{
64+
"field": "Level",
65+
"equals": "Error"
66+
}
67+
]
68+
},
69+
"actions": {
70+
"actionGroups": [
71+
{
72+
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup",
73+
"webhookProperties": {
74+
"sampleWebhookProperty": "SamplePropertyValue"
75+
},
76+
"actionProperties": {
77+
"Email.Title": "my email title"
78+
}
79+
}
80+
]
81+
},
82+
"enabled": true,
83+
"description": "Description of sample Activity Log Alert rule."
84+
}
85+
}
86+
},
87+
"201": {
88+
"headers": {},
89+
"body": {
90+
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule",
91+
"type": "Microsoft.Insights/ActivityLogAlerts",
92+
"name": "SampleActivityLogAlertRule",
93+
"location": "Global",
94+
"tags": {},
95+
"properties": {
96+
"scopes": [
97+
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
98+
],
99+
"condition": {
100+
"allOf": [
101+
{
102+
"field": "Category",
103+
"equals": "Administrative"
104+
},
105+
{
106+
"field": "Level",
107+
"equals": "Error"
108+
}
109+
]
110+
},
111+
"actions": {
112+
"actionGroups": [
113+
{
114+
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup",
115+
"webhookProperties": {
116+
"sampleWebhookProperty": "SamplePropertyValue"
117+
},
118+
"actionProperties": {
119+
"Email.Title": "my email title"
120+
}
121+
}
122+
]
123+
},
124+
"enabled": true,
125+
"description": "Description of sample Activity Log Alert rule."
126+
}
127+
}
128+
}
129+
}
130+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
4+
"resourceGroupName": "MyResourceGroup",
5+
"activityLogAlertName": "SampleActivityLogAlertRuleWithAnyOfCondition",
6+
"api-version": "2023-01-01-preview",
7+
"activityLogAlertRule": {
8+
"location": "Global",
9+
"tags": {},
10+
"properties": {
11+
"scopes": [
12+
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
13+
],
14+
"condition": {
15+
"allOf": [
16+
{
17+
"field": "category",
18+
"equals": "ServiceHealth"
19+
},
20+
{
21+
"anyOf": [
22+
{
23+
"field": "properties.incidentType",
24+
"equals": "Incident"
25+
},
26+
{
27+
"field": "properties.incidentType",
28+
"equals": "Maintenance"
29+
}
30+
]
31+
}
32+
]
33+
},
34+
"actions": {
35+
"actionGroups": [
36+
{
37+
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
38+
"webhookProperties": {
39+
"sampleWebhookProperty": "SamplePropertyValue"
40+
},
41+
"actionProperties": {
42+
"Email.Title": "my email title"
43+
}
44+
}
45+
]
46+
},
47+
"enabled": true,
48+
"description": "Description of sample Activity Log Alert rule with 'anyOf' condition."
49+
}
50+
}
51+
},
52+
"responses": {
53+
"200": {
54+
"headers": {},
55+
"body": {
56+
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithAnyOfCondition",
57+
"type": "Microsoft.Insights/ActivityLogAlerts",
58+
"name": "SampleActivityLogAlertRuleWithAnyOfCondition",
59+
"location": "Global",
60+
"tags": {},
61+
"properties": {
62+
"scopes": [
63+
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
64+
],
65+
"condition": {
66+
"allOf": [
67+
{
68+
"field": "category",
69+
"equals": "ServiceHealth"
70+
},
71+
{
72+
"anyOf": [
73+
{
74+
"field": "properties.incidentType",
75+
"equals": "Incident"
76+
},
77+
{
78+
"field": "properties.incidentType",
79+
"equals": "Maintenance"
80+
}
81+
]
82+
}
83+
]
84+
},
85+
"actions": {
86+
"actionGroups": [
87+
{
88+
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
89+
"webhookProperties": {
90+
"sampleWebhookProperty": "SamplePropertyValue"
91+
},
92+
"actionProperties": {
93+
"Email.Title": "my email title"
94+
}
95+
}
96+
]
97+
},
98+
"enabled": true,
99+
"description": "Description of sample Activity Log Alert rule with 'anyOf' condition."
100+
}
101+
}
102+
},
103+
"201": {
104+
"headers": {},
105+
"body": {
106+
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithAnyOfCondition",
107+
"type": "Microsoft.Insights/ActivityLogAlerts",
108+
"name": "SampleActivityLogAlertRuleWithAnyOfCondition",
109+
"location": "Global",
110+
"tags": {},
111+
"properties": {
112+
"scopes": [
113+
"subscriptions/187f412d-1758-44d9-b052-169e2564721d"
114+
],
115+
"condition": {
116+
"allOf": [
117+
{
118+
"field": "category",
119+
"equals": "ServiceHealth"
120+
},
121+
{
122+
"anyOf": [
123+
{
124+
"field": "properties.incidentType",
125+
"equals": "Incident"
126+
},
127+
{
128+
"field": "properties.incidentType",
129+
"equals": "Maintenance"
130+
}
131+
]
132+
}
133+
]
134+
},
135+
"actions": {
136+
"actionGroups": [
137+
{
138+
"actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup",
139+
"webhookProperties": {
140+
"sampleWebhookProperty": "SamplePropertyValue"
141+
},
142+
"actionProperties": {
143+
"Email.Title": "my email title"
144+
}
145+
}
146+
]
147+
},
148+
"enabled": true,
149+
"description": "Description of sample Activity Log Alert rule with 'anyOf' condition."
150+
}
151+
}
152+
}
153+
}
154+
}

0 commit comments

Comments
 (0)