Set-AzExpressRouteGateway
Frissítések méretezhető ExpressRoute-átjárót.
Syntax
Set-AzExpressRouteGateway
-ResourceGroupName <String>
-Name <String>
[-MinScaleUnits <UInt32>]
[-MaxScaleUnits <UInt32>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzExpressRouteGateway
-InputObject <PSExpressRouteGateway>
[-MinScaleUnits <UInt32>]
[-MaxScaleUnits <UInt32>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzExpressRouteGateway
-ResourceId <String>
[-MinScaleUnits <UInt32>]
[-MaxScaleUnits <UInt32>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
A Set-AzExpressRouteGateway parancsmag lehetővé teszi egy meglévő ExpressRouteGateway méretezési egységeinek frissítését vagy az erőforráscímkék frissítését.
Példák
1. példa
New-AzResourceGroup -Location "West US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testergw" -VirtualHubId $virtualHub.Id -MinScaleUnits 2
Set-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testergw" -MinScaleUnits 3
ResourceGroupName : testRG
Name : testergw
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/expressRouteGateways/testergw
Location : West US
MinScaleUnits : 3
Type : Microsoft.Network/expressRouteGateways
ProvisioningState : Succeeded
A fentiekben létrehozunk egy "testRG" erőforráscsoportot, egy Virtual WAN-t és egy Virtual Hubot az USA nyugati régiójában az Azure-beli erőforráscsoportban. Ezután létrejön egy ExpressRoute-átjáró a Virtual Hubon 2 skálázási egységgel, amelyet aztán 3 méretezési egységre módosítunk.
2. példa: Konfigurálja ezt az átjárót úgy, hogy fogadja a nem Virtual Wan-hálózatokról érkező forgalmat.
Lekérheti az átjárót, konfigurálhatja annak AllowNonVirtualWanTraffic tulajdonságát, és mentheti a módosításokat az átjárón, vagy használhatja a Set-AzExpressRouteGateway parancsmag kapcsolóját
# Option 1 - Retrieve the gateway object, configure it to allow traffic from VNets and persist those changes.
$gateway = Get-AzExpressRouteGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
$gateway.AllowNonVirtualWanTraffic = $true
$gateway = Set-AzExpressRouteGateway -InputObject $gateway
# Option 2 - Use the cmdlet switch
Set-AzExpressRouteGateway -ResourceGroupName "resourceGroup001" -Name "gateway001" -AllowNonVirtualWanTraffic $true
3. példa: Konfigurálja ezt az átjárót a nem Virtual Wan-hálózatokból érkező forgalom blokkolásához.
Lekérheti az átjárót, konfigurálhatja annak AllowNonVirtualWanTraffic tulajdonságát, és mentheti a módosításokat az átjárón, vagy használhatja a Set-AzExpressRouteGateway parancsmag kapcsolóját
# Option 1 - Retrieve the gateway object, configure it to block traffic from VNets and persist those changes.
$gateway=Get-AzExpressRouteGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
$gateway.AllowNonVirtualWanTraffic = $false
$gateway = Set-AzExpressRouteGateway -InputObject $gateway
# Option 2 - Use the cmdlet switch
Set-AzExpressRouteGateway -ResourceGroupName "resourceGroup001" -Name "gateway001" -AllowNonVirtualWanTraffic $false
Paraméterek
-AsJob
Parancsmag futtatása a háttérben
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Jóváhagyást kér a parancsmag futtatása előtt.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Az Azure-ral való kommunikációhoz használt hitelesítő adatok, fiók, bérlő és előfizetés.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
A frissíteni kívánt ExpressRouteGateway.
Type: | PSExpressRouteGateway |
Aliases: | ExpressRouteGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaxScaleUnits
Az ExpressRouteGateway skálázási egységeinek maximális száma. Érvényes tartomány > 2
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinScaleUnits
Az ExpressRouteGateway skálázási egységeinek minimális száma. Érvényes tartomány > 2
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Az erőforrás neve.
Type: | String |
Aliases: | ResourceName, ExpressRouteGatewayName, GatewayName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
A frissíteni kívánt ExpressRouteGateway erőforráscsoportjának neve.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
A frissíteni kívánt ExpressRouteGateway azonosítója.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Erőforráscímkéket képviselő kivonatoló.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Bemutatja, mi történne a parancsmag futtatásakor. A parancsmag nem fut.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |