Skip to content

Commit efc6605

Browse files
sohaibMSFTmsJinLei
andauthored
Application Gateway AutoScale Example (#15071)
* Add Example # 2 Example to convert an Application Gateway from Manual Scaling to AutoScale. * Added Example Added an additional example to the New-AzApplicationGatewayAutoscaleConfiguration cmdlet. * Update ChangeLog.md Co-authored-by: Jin Lei <[email protected]>
1 parent 388e6a3 commit efc6605

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Network/Network/help/New-AzApplicationGatewayAutoscaleConfiguration.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ PS C:\> $gw = New-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgna
3131
The first command creates an autoscale configuration with minimum capacity 3.
3232
The second command creates an application gateway with the autoscale configuration.
3333

34+
### Example 2
35+
36+
```powershell
37+
PS C:\> $gw = Get-AzApplicationGateway -Name <Name> -ResourceGroupName <ResourceGroupName>
38+
PS C:\> $gw.Sku.Capacity = $null
39+
PS C:\> $gw.AutoscaleConfiguration = New-AzApplicationGatewayAutoscaleConfiguration -MinCapacity 2 -MaxCapacity 4
40+
PS C:\> $gw = Set-AzApplicationGateway -ApplicationGateway $gw
41+
```
42+
43+
The first command gets the configuration of the Application Gateway into a variable.
44+
The second command clears the SKU Capacity variable to allow the Autoscale Configuration to be set.
45+
The third command specifies a new AutoScale Configuration for the Application Gateway.
46+
The fourth command applies the new configuration to the Application Gateway.
47+
3448
## PARAMETERS
3549

3650
### -DefaultProfile

0 commit comments

Comments
 (0)