Skip to content

Commit

Permalink
testing webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanSebranek committed Apr 30, 2024
1 parent fa2721f commit 970bb0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Module/AutomationAccount/AutomationAccount.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1030,12 +1030,15 @@ Function Add-AutoWebhook
} | ConvertTo-Json
write-verbose $payload

Invoke-RestMethod -Method Put `
$response = Invoke-RestMethod -Method Put `
-Uri $Uri `
-Body $payload `
-ContentType 'application/json' `
-Headers $headers `
-ErrorAction Stop

Write-Host "Webhook response properties: "
$response.properties
}
catch {
write-error $_
Expand Down
4 changes: 0 additions & 4 deletions Tasks/Manage-AutomationWebHook/Manage-AutomationWebHook.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ foreach($def in $definitions)
-RunOn $runOn `
-ExpiresOn $Expires `
-Parameters $params

#write webhook properties parameters
Write-Host "Webhook response properties: "
$webhook.properties.parameters

$webhook | Add-Member -MemberType NoteProperty -Name SupportedRequestTypes -Value $SupportedRequestTypes
$managedWebhooks+=$webhook
Expand Down

0 comments on commit 970bb0c

Please sign in to comment.