Skip to content

Commit fa79caa

Browse files
author
SDKAuto
committed
CodeGen from PR 22575 in Azure/azure-rest-api-specs
Merge 408c2cceaeb3f89c03643c106cf9f97feb033d4e into 66e7f9b04a2325fe00afd04d8abdab6ed78b7c4a
1 parent 8804c3c commit fa79caa

File tree

2 files changed

+289
-0
lines changed

2 files changed

+289
-0
lines changed
Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
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+
"oneOf": [
23+
{
24+
"type": "string",
25+
"pattern": "^[-\\w\\._\\(\\)]+$"
26+
},
27+
{
28+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
29+
}
30+
],
31+
"description": "The name of the Activity Log Alert rule."
32+
},
33+
"properties": {
34+
"oneOf": [
35+
{
36+
"$ref": "#/definitions/AlertRuleProperties"
37+
},
38+
{
39+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
40+
}
41+
],
42+
"description": "An Azure Activity Log Alert rule."
43+
},
44+
"tags": {
45+
"oneOf": [
46+
{
47+
"type": "object",
48+
"additionalProperties": {
49+
"type": "string"
50+
},
51+
"properties": {}
52+
},
53+
{
54+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
55+
}
56+
],
57+
"description": "The tags of the resource."
58+
},
59+
"type": {
60+
"type": "string",
61+
"enum": [
62+
"Microsoft.Insights/activityLogAlerts"
63+
]
64+
}
65+
},
66+
"required": [
67+
"apiVersion",
68+
"name",
69+
"properties",
70+
"type"
71+
],
72+
"description": "Microsoft.Insights/activityLogAlerts"
73+
}
74+
},
75+
"definitions": {
76+
"Action": {
77+
"type": "object",
78+
"properties": {
79+
"actionGroups": {
80+
"oneOf": [
81+
{
82+
"type": "array",
83+
"items": {
84+
"type": "string"
85+
}
86+
},
87+
{
88+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
89+
}
90+
],
91+
"description": "Action Group resource Ids to invoke when the alert fires."
92+
},
93+
"actionProperties": {
94+
"oneOf": [
95+
{
96+
"type": "object",
97+
"additionalProperties": {
98+
"type": "string"
99+
},
100+
"properties": {}
101+
},
102+
{
103+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
104+
}
105+
],
106+
"description": "A dictionary with properties and configuration items for the action groups."
107+
},
108+
"customProperties": {
109+
"oneOf": [
110+
{
111+
"type": "object",
112+
"additionalProperties": {
113+
"type": "string"
114+
},
115+
"properties": {}
116+
},
117+
{
118+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
119+
}
120+
],
121+
"description": "A dictionary dictionary of custom properties to include with the post operation. The data is appended to the alert payload."
122+
}
123+
},
124+
"description": "Actions to invoke when the alert fires."
125+
},
126+
"AlertRuleAllOfCondition": {
127+
"type": "object",
128+
"properties": {
129+
"allOf": {
130+
"oneOf": [
131+
{
132+
"type": "array",
133+
"items": {
134+
"$ref": "#/definitions/AlertRuleAnyOfOrLeafCondition"
135+
}
136+
},
137+
{
138+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
139+
}
140+
],
141+
"description": "The list of Activity Log Alert rule conditions."
142+
}
143+
},
144+
"required": [
145+
"allOf"
146+
],
147+
"description": "An Activity Log Alert rule condition that is met when all its member conditions are met."
148+
},
149+
"AlertRuleAnyOfOrLeafCondition": {
150+
"type": "object",
151+
"properties": {
152+
"anyOf": {
153+
"oneOf": [
154+
{
155+
"type": "array",
156+
"items": {
157+
"$ref": "#/definitions/AlertRuleLeafCondition"
158+
}
159+
},
160+
{
161+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
162+
}
163+
],
164+
"description": "An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met."
165+
},
166+
"containsAny": {
167+
"oneOf": [
168+
{
169+
"type": "array",
170+
"items": {
171+
"type": "string"
172+
}
173+
},
174+
{
175+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
176+
}
177+
],
178+
"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."
179+
},
180+
"equals": {
181+
"type": "string",
182+
"description": "The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met."
183+
},
184+
"field": {
185+
"type": "string",
186+
"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'."
187+
}
188+
},
189+
"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"
190+
},
191+
"AlertRuleLeafCondition": {
192+
"type": "object",
193+
"properties": {
194+
"containsAny": {
195+
"oneOf": [
196+
{
197+
"type": "array",
198+
"items": {
199+
"type": "string"
200+
}
201+
},
202+
{
203+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
204+
}
205+
],
206+
"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."
207+
},
208+
"equals": {
209+
"type": "string",
210+
"description": "The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met."
211+
},
212+
"field": {
213+
"type": "string",
214+
"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'."
215+
}
216+
},
217+
"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'."
218+
},
219+
"AlertRuleProperties": {
220+
"type": "object",
221+
"properties": {
222+
"actions": {
223+
"oneOf": [
224+
{
225+
"$ref": "#/definitions/Action"
226+
},
227+
{
228+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
229+
}
230+
],
231+
"description": "Actions to invoke when the alert fires."
232+
},
233+
"condition": {
234+
"oneOf": [
235+
{
236+
"$ref": "#/definitions/AlertRuleAllOfCondition"
237+
},
238+
{
239+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
240+
}
241+
],
242+
"description": "An Activity Log Alert rule condition that is met when all its member conditions are met."
243+
},
244+
"description": {
245+
"type": "string",
246+
"description": "A description of this Activity Log Alert rule."
247+
},
248+
"enabled": {
249+
"oneOf": [
250+
{
251+
"type": "boolean",
252+
"default": true
253+
},
254+
{
255+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
256+
}
257+
],
258+
"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."
259+
},
260+
"scopes": {
261+
"oneOf": [
262+
{
263+
"type": "array",
264+
"items": {
265+
"type": "string"
266+
}
267+
},
268+
{
269+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
270+
}
271+
],
272+
"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."
273+
},
274+
"tenantScope": {
275+
"type": "string",
276+
"description": "The tenant GUID. Must be provided for tenant-level and management group events rules."
277+
}
278+
},
279+
"required": [
280+
"actions",
281+
"condition"
282+
],
283+
"description": "An Azure Activity Log Alert rule."
284+
}
285+
}
286+
}

schemas/common/autogeneratedResources.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13447,6 +13447,9 @@
1344713447
{
1344813448
"$ref": "https://schema.management.azure.com/schemas/2023-01-01/Microsoft.Insights.json#/resourceDefinitions/actionGroups"
1344913449
},
13450+
{
13451+
"$ref": "https://schema.management.azure.com/schemas/2023-01-01-preview/Microsoft.Insights.json#/resourceDefinitions/activityLogAlerts"
13452+
},
1345013453
{
1345113454
"$ref": "https://schema.management.azure.com/schemas/2018-09-01/Microsoft.IotCentral.json#/resourceDefinitions/iotApps"
1345213455
},

0 commit comments

Comments
 (0)