Skip to content

Commit 4a5138a

Browse files
authored
Automation rules - 2023-03-01-preview - add entity trigger API (#22523)
1 parent edf5cfd commit 4a5138a

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-03-01-preview/AutomationRules.json

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,66 @@
217217
}
218218
}
219219
},
220+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityIdentifier}/runPlaybook": {
221+
"post": {
222+
"tags": [
223+
"manualTrigger"
224+
],
225+
"description": "Triggers playbook on a specific entity.",
226+
"operationId": "Entities_RunPlaybook",
227+
"consumes": [
228+
"application/json"
229+
],
230+
"produces": [
231+
"application/json"
232+
],
233+
"parameters": [
234+
{
235+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
236+
},
237+
{
238+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
239+
},
240+
{
241+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
242+
},
243+
{
244+
"$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName"
245+
},
246+
{
247+
"in": "path",
248+
"name": "entityIdentifier",
249+
"description": "Entity identifier.",
250+
"required": true,
251+
"type": "string"
252+
},
253+
{
254+
"in": "body",
255+
"name": "requestBody",
256+
"description": "Describes the request body for triggering a playbook on an entity.",
257+
"schema": {
258+
"$ref": "#/definitions/EntityManualTriggerRequestBody"
259+
}
260+
}
261+
],
262+
"responses": {
263+
"204": {
264+
"description": "No Content"
265+
},
266+
"default": {
267+
"description": "Error response describing why the operation failed.",
268+
"schema": {
269+
"$ref": "../../../common/2.0/types.json#/definitions/CloudError"
270+
}
271+
}
272+
},
273+
"x-ms-examples": {
274+
"Entities_RunPlaybook": {
275+
"$ref": "./examples/manualTrigger/Entities_RunPlaybook.json"
276+
}
277+
}
278+
}
279+
},
220280
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}/runPlaybook": {
221281
"post": {
222282
"tags": [
@@ -1183,6 +1243,28 @@
11831243
]
11841244
}
11851245
},
1246+
"EntityManualTriggerRequestBody": {
1247+
"type": "object",
1248+
"description": "Describes the request body for triggering a playbook on an entity.",
1249+
"required": [
1250+
"logicAppsResourceId"
1251+
],
1252+
"properties": {
1253+
"incidentArmId": {
1254+
"type": "string",
1255+
"description": "Incident ARM id."
1256+
},
1257+
"tenantId": {
1258+
"format": "uuid",
1259+
"type": "string",
1260+
"description": "The tenant id of the playbook resource."
1261+
},
1262+
"logicAppsResourceId": {
1263+
"type": "string",
1264+
"description": "The resource id of the playbook resource."
1265+
}
1266+
}
1267+
},
11861268
"IncidentPropertiesAction": {
11871269
"type": "object",
11881270
"properties": {
@@ -1234,6 +1316,9 @@
12341316
},
12351317
"PlaybookActionProperties": {
12361318
"type": "object",
1319+
"required": [
1320+
"logicAppResourceId"
1321+
],
12371322
"properties": {
12381323
"logicAppResourceId": {
12391324
"description": "The resource id of the playbook resource.",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-03-01-preview",
4+
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
5+
"resourceGroupName": "myRg",
6+
"workspaceName": "myWorkspace",
7+
"entityIdentifier": "72e01a22-5cd2-4139-a149-9f2736ff2ar2",
8+
"manualTriggerRequestBody": {
9+
"logicAppsResourceId": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.Logic/workflows/my-playbook-name",
10+
"tenantId": "qwere6b2-9ac0-4464-9919-dccaee2e4ddd",
11+
"incidentArmId": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/incidents/73e01a99-5cd7-4139-a149-9f2736ff2ab5"
12+
}
13+
},
14+
"responses": {
15+
"204": {}
16+
}
17+
}

0 commit comments

Comments
 (0)