Skip to content

Commit f2af6b1

Browse files
authored
Update swagger with new properties (#11901)
1 parent df0cad3 commit f2af6b1

File tree

5 files changed

+83
-14
lines changed

5 files changed

+83
-14
lines changed

specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2020-08-04-preview/ResourceHealthAlertRules.json

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@
457457
"namespace": {
458458
"type": "string",
459459
"enum": [
460-
"VmGuestHealth"
460+
"GuestVmHealth"
461461
],
462462
"x-ms-enum": {
463463
"name": "HealthAlertsNamespace",
@@ -472,17 +472,27 @@
472472
"description": "The rule criterion that defines the conditions of the alert rule."
473473
},
474474
"VmGuestHealthAlertCriterion": {
475-
"x-ms-discriminator-value": "VmGuestHealth",
475+
"x-ms-discriminator-value": "GuestVmHealth",
476476
"type": "object",
477477
"allOf": [
478478
{
479479
"$ref": "#/definitions/HealthAlertCriterion"
480480
}
481481
],
482482
"properties": {
483-
"healthMonitorName": {
484-
"type": "string",
485-
"description": "Name of health monitor on which to define alert"
483+
"monitorNames": {
484+
"type": "array",
485+
"items": {
486+
"type": "string"
487+
},
488+
"description": "Names of health monitor on which to define alert"
489+
},
490+
"monitorTypes": {
491+
"type": "array",
492+
"items": {
493+
"type": "string"
494+
},
495+
"description": "Names of health monitor type on which to define alert"
486496
},
487497
"healthStates": {
488498
"type": "array",
@@ -493,7 +503,7 @@
493503
}
494504
},
495505
"required": [
496-
"healthMonitorName"
506+
"healthStates"
497507
],
498508
"description": "Specifies the health alert criteria to alert on."
499509
},
@@ -502,10 +512,19 @@
502512
"properties": {
503513
"healthStateName": {
504514
"type": "string",
505-
"description": "Health state"
515+
"description": "Health state name",
516+
"enum": [
517+
"Warning",
518+
"Critical"
519+
],
520+
"x-ms-enum": {
521+
"name": "HealthStateName",
522+
"modelAsString": true
523+
}
506524
},
507525
"severity": {
508-
"type": "string",
526+
"type": "integer",
527+
"format": "int64",
509528
"description": "Severity of alert fired"
510529
}
511530
},

specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2020-08-04-preview/examples/createOrUpdateResourceHealthAlertRule.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@
1818
"monitorNames": [
1919
"root"
2020
],
21-
"namespace": "VmGuestHealth"
21+
"healthStates": [
22+
{
23+
"name": "Critical",
24+
"severity": 2
25+
},
26+
{
27+
"name": "Warning",
28+
"severity": 3
29+
}
30+
],
31+
"namespace": "GuestVmHealth"
2232
}
2333
]
2434
},
@@ -51,7 +61,7 @@
5161
"allOf": [
5262
{
5363
"monitorNames": "root",
54-
"namespace": "VmGuestHealth"
64+
"namespace": "GuestVmHealth"
5565
}
5666
]
5767
},

specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2020-08-04-preview/examples/getResourceHealthAlertRule.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,17 @@
2424
"monitorNames": [
2525
"root"
2626
],
27-
"namespace": "VmGuestHealth"
27+
"healthStates": [
28+
{
29+
"name": "Critical",
30+
"severity": 2
31+
},
32+
{
33+
"name": "Warning",
34+
"severity": 3
35+
}
36+
],
37+
"namespace": "GuestVmHealth"
2838
}
2939
]
3040
},

specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2020-08-04-preview/examples/listResourceHealthAlertRules.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,17 @@
2525
"monitorNames": [
2626
"root"
2727
],
28-
"namespace": "VmGuestHealth"
28+
"healthStates": [
29+
{
30+
"name": "Critical",
31+
"severity": 2
32+
},
33+
{
34+
"name": "Warning",
35+
"severity": 3
36+
}
37+
],
38+
"namespace": "GuestVmHealth"
2939
}
3040
]
3141
},

specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2020-08-04-preview/examples/patchResourceHealthAlertRule.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@
1717
"monitorNames": [
1818
"root"
1919
],
20-
"namespace": "VmGuestHealth"
20+
"healthStates": [
21+
{
22+
"name": "Critical",
23+
"severity": 2
24+
},
25+
{
26+
"name": "Warning",
27+
"severity": 3
28+
}
29+
],
30+
"namespace": "GuestVmHealth"
2131
}
2232
]
2333
},
@@ -52,7 +62,17 @@
5262
"monitorNames": [
5363
"root"
5464
],
55-
"namespace": "VmGuestHealth"
65+
"healthStates": [
66+
{
67+
"name": "Critical",
68+
"severity": 2
69+
},
70+
{
71+
"name": "Warning",
72+
"severity": 3
73+
}
74+
],
75+
"namespace": "GuestVmHealth"
5676
}
5777
]
5878
},

0 commit comments

Comments
 (0)