Skip to content

Commit 1dfe58f

Browse files
author
SDKAuto
committed
CodeGen from PR 22575 in Azure/azure-rest-api-specs
Merge 58e200d1fe0765b36378c106af0c1d1cbf012fcc into f1180941e238bc99ac71f9535ecd126bb8b77d8f
1 parent 1395391 commit 1dfe58f

File tree

4 files changed

+925
-3
lines changed

4 files changed

+925
-3
lines changed

schemas/2021-06-03-preview/Microsoft.Monitor.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@
1818
"description": "The geo-location where the resource lives"
1919
},
2020
"name": {
21-
"type": "string",
21+
"oneOf": [
22+
{
23+
"type": "string",
24+
"pattern": "^(?!-)[a-zA-Z0-9-]+[^-]$"
25+
},
26+
{
27+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
28+
}
29+
],
2230
"description": "The name of the Azure Monitor workspace. The name is case insensitive"
2331
},
2432
"properties": {
2533
"oneOf": [
2634
{
27-
"$ref": "#/definitions/MonitoringAccountResourceProperties"
35+
"$ref": "#/definitions/AzureMonitorWorkspaceResourceProperties"
2836
},
2937
{
3038
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -65,7 +73,7 @@
6573
}
6674
},
6775
"definitions": {
68-
"MonitoringAccountResourceProperties": {
76+
"AzureMonitorWorkspaceResourceProperties": {
6977
"type": "object",
7078
"properties": {},
7179
"description": "Resource properties"
Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
{
2+
"id": "https://schema.management.azure.com/schemas/2023-01-01-preview/Microsoft.Insights.json#",
3+
"$schema": "http://json-schema.org/draft-04/schema#",
4+
"title": "Microsoft.Insights",
5+
"description": "Microsoft Insights Resource Types",
6+
"resourceDefinitions": {
7+
"activityLogAlerts": {
8+
"type": "object",
9+
"properties": {
10+
"apiVersion": {
11+
"type": "string",
12+
"enum": [
13+
"2023-01-01-preview"
14+
]
15+
},
16+
"location": {
17+
"type": "string",
18+
"default": "global",
19+
"description": "The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always be 'global'."
20+
},
21+
"name": {
22+
"type": "string",
23+
"description": "The name of the Activity Log Alert rule."
24+
},
25+
"properties": {
26+
"oneOf": [
27+
{
28+
"$ref": "#/definitions/AlertRuleProperties"
29+
},
30+
{
31+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
32+
}
33+
],
34+
"description": "An Azure Activity Log Alert rule."
35+
},
36+
"tags": {
37+
"oneOf": [
38+
{
39+
"type": "object",
40+
"additionalProperties": {
41+
"type": "string"
42+
},
43+
"properties": {}
44+
},
45+
{
46+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
47+
}
48+
],
49+
"description": "The tags of the resource."
50+
},
51+
"type": {
52+
"type": "string",
53+
"enum": [
54+
"Microsoft.Insights/activityLogAlerts"
55+
]
56+
}
57+
},
58+
"required": [
59+
"apiVersion",
60+
"name",
61+
"properties",
62+
"type"
63+
],
64+
"description": "Microsoft.Insights/activityLogAlerts"
65+
}
66+
},
67+
"definitions": {
68+
"ActionGroup": {
69+
"type": "object",
70+
"properties": {
71+
"actionGroupId": {
72+
"type": "string",
73+
"description": "The resource ID of the Action Group. This cannot be null or empty."
74+
},
75+
"webhookProperties": {
76+
"oneOf": [
77+
{
78+
"type": "object",
79+
"additionalProperties": {
80+
"type": "string"
81+
},
82+
"properties": {}
83+
},
84+
{
85+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
86+
}
87+
],
88+
"description": "the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload."
89+
}
90+
},
91+
"required": [
92+
"actionGroupId"
93+
],
94+
"description": "A pointer to an Azure Action Group."
95+
},
96+
"ActionList": {
97+
"type": "object",
98+
"properties": {
99+
"actionGroups": {
100+
"oneOf": [
101+
{
102+
"type": "array",
103+
"items": {
104+
"$ref": "#/definitions/ActionGroup"
105+
}
106+
},
107+
{
108+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
109+
}
110+
],
111+
"description": "The list of the Action Groups."
112+
}
113+
},
114+
"description": "A list of Activity Log Alert rule actions."
115+
},
116+
"AlertRuleAllOfCondition": {
117+
"type": "object",
118+
"properties": {
119+
"allOf": {
120+
"oneOf": [
121+
{
122+
"type": "array",
123+
"items": {
124+
"$ref": "#/definitions/AlertRuleAnyOfOrLeafCondition"
125+
}
126+
},
127+
{
128+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
129+
}
130+
],
131+
"description": "The list of Activity Log Alert rule conditions."
132+
}
133+
},
134+
"required": [
135+
"allOf"
136+
],
137+
"description": "An Activity Log Alert rule condition that is met when all its member conditions are met."
138+
},
139+
"AlertRuleAnyOfOrLeafCondition": {
140+
"type": "object",
141+
"properties": {
142+
"anyOf": {
143+
"oneOf": [
144+
{
145+
"type": "array",
146+
"items": {
147+
"$ref": "#/definitions/AlertRuleLeafCondition"
148+
}
149+
},
150+
{
151+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
152+
}
153+
],
154+
"description": "An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met."
155+
},
156+
"containsAny": {
157+
"oneOf": [
158+
{
159+
"type": "array",
160+
"items": {
161+
"type": "string"
162+
}
163+
},
164+
{
165+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
166+
}
167+
],
168+
"description": "The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met."
169+
},
170+
"equals": {
171+
"type": "string",
172+
"description": "The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met."
173+
},
174+
"field": {
175+
"type": "string",
176+
"description": "The name of the Activity Log event's field that this condition will examine.\nThe possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'."
177+
}
178+
},
179+
"description": "An Activity Log Alert rule condition that is met when all its member conditions are met.\nEach condition can be of one of the following types:\n__Important__: Each type has its unique subset of properties. Properties from different types CANNOT exist in one condition.\n * __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'.\n _Please note, 'anyOf' should __not__ be set in a Leaf Condition._\n * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions).\n _Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf Condition._\n"
180+
},
181+
"AlertRuleLeafCondition": {
182+
"type": "object",
183+
"properties": {
184+
"containsAny": {
185+
"oneOf": [
186+
{
187+
"type": "array",
188+
"items": {
189+
"type": "string"
190+
}
191+
},
192+
{
193+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
194+
}
195+
],
196+
"description": "The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met."
197+
},
198+
"equals": {
199+
"type": "string",
200+
"description": "The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met."
201+
},
202+
"field": {
203+
"type": "string",
204+
"description": "The name of the Activity Log event's field that this condition will examine.\nThe possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'."
205+
}
206+
},
207+
"description": "An Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event.\nThis condition must contain 'field' and either 'equals' or 'containsAny'."
208+
},
209+
"AlertRuleProperties": {
210+
"type": "object",
211+
"properties": {
212+
"actions": {
213+
"oneOf": [
214+
{
215+
"$ref": "#/definitions/ActionList"
216+
},
217+
{
218+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
219+
}
220+
],
221+
"description": "A list of Activity Log Alert rule actions."
222+
},
223+
"condition": {
224+
"oneOf": [
225+
{
226+
"$ref": "#/definitions/AlertRuleAllOfCondition"
227+
},
228+
{
229+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
230+
}
231+
],
232+
"description": "An Activity Log Alert rule condition that is met when all its member conditions are met."
233+
},
234+
"description": {
235+
"type": "string",
236+
"description": "A description of this Activity Log Alert rule."
237+
},
238+
"enabled": {
239+
"oneOf": [
240+
{
241+
"type": "boolean",
242+
"default": true
243+
},
244+
{
245+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
246+
}
247+
],
248+
"description": "Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated."
249+
},
250+
"scopes": {
251+
"oneOf": [
252+
{
253+
"type": "array",
254+
"items": {
255+
"type": "string"
256+
}
257+
},
258+
{
259+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
260+
}
261+
],
262+
"description": "A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item."
263+
}
264+
},
265+
"required": [
266+
"actions",
267+
"condition",
268+
"scopes"
269+
],
270+
"description": "An Azure Activity Log Alert rule."
271+
}
272+
}
273+
}

0 commit comments

Comments
 (0)