Skip to content

Commit 3f568b4

Browse files
sumitabarahmandsarangan12
authored andcommitted
Add spec for alert repair/remediate (#4084)
* Add spec for alert repair/remediate * Update remediate route to repair * Add alert remediation properties to the alert model * fix oav validation errors * update remediationActionType items * remove remediationActionType as that is not exposed on an alert * change hasRemediationAction type to boolean
1 parent 3373760 commit 3f568b4

File tree

2 files changed

+64
-19
lines changed
  • specification/azsadmin/resource-manager/infrastructureinsights/Microsoft.InfrastructureInsights.Admin/preview/2016-05-01

2 files changed

+64
-19
lines changed

specification/azsadmin/resource-manager/infrastructureinsights/Microsoft.InfrastructureInsights.Admin/preview/2016-05-01/Alert.json

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
"schemes": [
1010
"https"
1111
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
1218
"paths": {
1319
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/{location}/alerts": {
1420
"get": {
@@ -50,13 +56,7 @@
5056
"x-ms-pageable": {
5157
"nextLinkName": "nextLink"
5258
},
53-
"x-ms-odata": "#/definitions/Alert",
54-
"produces": [
55-
"application/json"
56-
],
57-
"consumes": [
58-
"application/json"
59-
]
59+
"x-ms-odata": "#/definitions/Alert"
6060
}
6161
},
6262
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/{location}/alerts/{alertName}": {
@@ -95,13 +95,7 @@
9595
"$ref": "#/definitions/Alert"
9696
}
9797
}
98-
},
99-
"produces": [
100-
"application/json"
101-
],
102-
"consumes": [
103-
"application/json"
104-
]
98+
}
10599
},
106100
"put": {
107101
"x-ms-examples": {
@@ -144,13 +138,47 @@
144138
"$ref": "#/definitions/Alert"
145139
}
146140
}
141+
}
142+
}
143+
},
144+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/{location}/alerts/{alertName}/repair": {
145+
"post": {
146+
"x-ms-examples": {
147+
"Repairs an alert.": {
148+
"$ref": "./examples/Alert/Repair.json"
149+
}
147150
},
148-
"produces": [
149-
"application/json"
151+
"tags": [
152+
"Alerts"
153+
],
154+
"x-ms-long-running-operation": true,
155+
"description": "Repairs an alert.",
156+
"operationId": "Alerts_Repair",
157+
"parameters": [
158+
{
159+
"$ref": "InfrastructureInsights.json#/parameters/SubscriptionIdParameter"
160+
},
161+
{
162+
"$ref": "InfrastructureInsights.json#/parameters/ResourceGroupParameter"
163+
},
164+
{
165+
"$ref": "InfrastructureInsights.json#/parameters/LocationParameter"
166+
},
167+
{
168+
"$ref": "#/parameters/AlertNameParameter"
169+
},
170+
{
171+
"$ref": "InfrastructureInsights.json#/parameters/ApiVersionParameter"
172+
}
150173
],
151-
"consumes": [
152-
"application/json"
153-
]
174+
"responses": {
175+
"200": {
176+
"description": "OK"
177+
},
178+
"202": {
179+
"description": "ACCEPTED"
180+
}
181+
}
154182
}
155183
}
156184
},
@@ -250,6 +278,10 @@
250278
"closedByUserAlias": {
251279
"description": "User alias who closed the alert.",
252280
"type": "string"
281+
},
282+
"hasValidRemediationAction": {
283+
"description": "Indicates if the alert can be remediated.",
284+
"type": "boolean"
253285
}
254286
}
255287
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
4+
"resourceGroupName": "System.local",
5+
"location": "local",
6+
"alertName": "ca55be03-9be9-4deb-8467-e890ab1d116b",
7+
"api-version": "2016-05-01"
8+
},
9+
"responses": {
10+
"200": {},
11+
"202": {}
12+
}
13+
}

0 commit comments

Comments
 (0)