We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4d6915 commit 4d5d764Copy full SHA for 4d5d764
templates/AzureFunctionEventGrid/run.ps1
@@ -0,0 +1,23 @@
1
+param (
2
+ $EventGridEvent,
3
+
4
+ $TriggerMetadata
5
+)
6
7
+Write-Host "Trigger: %COMMAND% has been invoked"
8
9
+$parameters = Get-RestParameter -Request $EventGridEvent -Command %COMMAND%
10
11
+try {
12
+ $results = %COMMAND% @parameters -ErrorAction Stop
13
+}
14
+catch {
15
+ $_ | Out-String | ForEach-Object {
16
+ foreach ($line in ($_ -split "`n")) {
17
+ Write-Warning $line
18
+ }
19
20
+ Write-FunctionResult -Status InternalServerError -Body "$_"
21
+ return
22
23
+Write-FunctionResult -Status OK -Body $results
0 commit comments