Skip to content

Commit f582e20

Browse files
Update pre-post-events-schedule-maintenance-configuration.md
Fix webhook creation code. Previously was using New-AzEventGridSystemTopicEventSubscription -Endpoint $PreEventWebhookEndpoint, but -Endpoint is no longer a valid parameter starting in Azure PowerShell 12.3.0 (was supported in Azure PowerShell 11.6.0) - https://learn.microsoft.com/en-us/powershell/module/az.eventgrid/new-azeventgridsystemtopiceventsubscription
1 parent 4374197 commit f582e20

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

articles/update-manager/pre-post-events-schedule-maintenance-configuration.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ In the **Event Subscription Details** section, provide an appropriate name.
8686
$EventSubscriptionName = "PreEventWebhook"
8787
8888
$PreEventWebhookEndpoint = "<Webhook URL>"
89-
90-
New-AzEventGridSystemTopicEventSubscription -ResourceGroupName $ResourceGroupForSystemTopic -SystemTopicName $SystemTopicName -EventSubscriptionName $EventSubscriptionName -Endpoint $PreEventWebhookEndpoint -IncludedEventType $IncludedEventTypes
89+
90+
$dest = New-AzEventGridWebHookEventSubscriptionDestinationObject -EndpointUrl $PreEventWebhookEndpoint
91+
92+
New-AzEventGridSystemTopicEventSubscription -ResourceGroupName $ResourceGroupForSystemTopic -SystemTopicName $SystemTopicName -EventSubscriptionName $EventSubscriptionName -Endpoint $PreEventWebhookEndpoint -IncludedEventType $IncludedEventTypes -Destination $dest
9193
9294
# Azure Function
9395
@@ -268,8 +270,10 @@ In the **Event Subscription Details** section, provide an appropriate name.
268270
$EventSubscriptionName = "PreEventWebhook"
269271
270272
$PreEventWebhookEndpoint = "<Webhook URL>"
273+
274+
$dest = New-AzEventGridWebHookEventSubscriptionDestinationObject -EndpointUrl $PreEventWebhookEndpoint
271275
272-
New-AzEventGridSystemTopicEventSubscription -ResourceGroupName $ResourceGroupForSystemTopic -SystemTopicName $SystemTopicName -EventSubscriptionName $EventSubscriptionName -Endpoint $PreEventWebhookEndpoint -IncludedEventType $IncludedEventTypes
276+
New-AzEventGridSystemTopicEventSubscription -ResourceGroupName $ResourceGroupForSystemTopic -SystemTopicName $SystemTopicName -EventSubscriptionName $EventSubscriptionName -Endpoint $PreEventWebhookEndpoint -IncludedEventType $IncludedEventTypes -Destination $dest
273277
274278
# Azure Function
275279

0 commit comments

Comments
 (0)