Skip to content

Commit c89d4da

Browse files
committed
format powershell
1 parent 1211d41 commit c89d4da

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

articles/azure-monitor/autoscale/autoscale-webhook-email.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,22 @@ The following example shows how to configure a webhook and email notification.
8181
```powershell
8282
# Assumining you have already created a profile object and have a vmssName, resourceGroup, and subscriptionId
8383
84-
$webhook=New-AzAutoscaleWebhookNotificationObject -Property @{"method"='GET'; "headers"= '"Authorization", "tokenvalue-12345678abcdef"'} -ServiceUri "http://myservice.com/webhook-listerner-123"
85-
86-
$notification=New-AzAutoscaleNotificationObject -EmailCustomEmail "[email protected]" -EmailSendToSubscriptionAdministrator $true -EmailSendToSubscriptionCoAdministrator $true -Webhook $webhook
87-
88-
89-
New-AzAutoscaleSetting -Name autoscalesetting2 -ResourceGroupName $resourceGroup -Location eastus -Profile $profile -Enabled -Notification $notification -PropertiesName "autoscalesetting"
84+
$webhook=New-AzAutoscaleWebhookNotificationObject `
85+
-Property @{"method"='GET'; "headers"= '"Authorization", "tokenvalue-12345678abcdef"'} `
86+
-ServiceUri "http://myservice.com/webhook-listerner-123"
87+
88+
$notification=New-AzAutoscaleNotificationObject `
89+
-EmailCustomEmail "[email protected]" `
90+
-EmailSendToSubscriptionAdministrator $true ` -EmailSendToSubscriptionCoAdministrator $true `
91+
-Webhook $webhook
92+
93+
94+
New-AzAutoscaleSetting -Name autoscalesetting2 `
95+
-ResourceGroupName $resourceGroup `
96+
-Location eastus `
97+
-Profile $profile `
98+
-Enabled -Notification $notification `
99+
-PropertiesName "autoscalesetting" `
90100
-TargetResourceUri "/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/$vmssName"
91101
```
92102

0 commit comments

Comments
 (0)