This commit is contained in:
dicolanl 2020-04-07 08:08:58 -04:00
Родитель 54ff9a2699
Коммит c94883dbb4
1 изменённых файлов: 16 добавлений и 23 удалений

Просмотреть файл

@ -96,36 +96,29 @@
}
},
"method": "get",
"path": "/cases/@{encodeURIComponent(triggerBody()?['SystemAlertId'])}/@{encodeURIComponent(triggerBody()?['WorkspaceSubscriptionId'])}/@{encodeURIComponent(triggerBody()?['WorkspaceId'])}/@{encodeURIComponent(triggerBody()?['WorkspaceResourceGroup'])}"
"path": "/Cases/@{encodeURIComponent(triggerBody()?['SystemAlertId'])}/@{encodeURIComponent(triggerBody()?['WorkspaceSubscriptionId'])}/@{encodeURIComponent(triggerBody()?['WorkspaceId'])}/@{encodeURIComponent(triggerBody()?['WorkspaceResourceGroup'])}"
}
},
"For_each": {
"foreach": "@body('Alert_-_Get_incident')?['value']",
"actions": {
"Post_message": {
"runAfter": {},
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['slack']['connectionId']"
}
},
"method": "post",
"path": "/chat.postMessage",
"queries": {
"channel": "CN6BGHDJM",
"text": "New Alert:@{triggerBody()?['AlertDisplayName']}\nDescription: @{triggerBody()?['Description']}\nAlert Severity:@{triggerBody()?['Severity']}\nSubscription: @{triggerBody()?['WorkspaceSubscriptionId']}\n\nPlease Investigate.\n\n"
}
}
}
},
"Post_message": {
"runAfter": {
"Alert_-_Get_incident": [
"Succeeded"
]
},
"type": "Foreach"
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['slack']['connectionId']"
}
},
"method": "post",
"path": "/chat.postMessage",
"queries": {
"channel": "CN6BGHDJM",
"text": "New Alert:@{body('Alert_-_Get_incident')?['properties']?['Title']}\nDescription: @{body('Alert_-_Get_incident')?['properties']?['Description']}\nAlert Severity:@{body('Alert_-_Get_incident')?['properties']?['Severity']}\nSubscription: @{triggerBody()?['WorkspaceSubscriptionId']}\n\nPlease Investigate.\n\n"
}
}
}
},
"outputs": {}