Set-AzExpressRouteCircuitConnectionConfig
更新在 Express Route 線路的私人對等互連中建立的線路連線設定。
語法
SetByResource (預設值)
Set-AzExpressRouteCircuitConnectionConfig
[-Name] <String>
[-ExpressRouteCircuit] <PSExpressRouteCircuit>
[-AddressPrefix] <String>
[-AddressPrefixType <String>]
[-AuthorizationKey <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourceId
Set-AzExpressRouteCircuitConnectionConfig
[-Name] <String>
[-ExpressRouteCircuit] <PSExpressRouteCircuit>
[-PeerExpressRouteCircuitPeering] <String>
[-AddressPrefix] <String>
[-AddressPrefixType <String>]
[-AuthorizationKey <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Set-AzExpressRouteCircuitConnectionConfig Cmdlet 會更新在 ExpressRoute 線路的私人對等互連中建立的線路連線設定。 這可讓跨區域或訂用帳戶對等互連兩個 Express Route 線路。
請注意,在執行 Set-AzExpressRouteCircuitConnectionConfig 之前,您必須使用 Add-AzExpressRouteCircuitConnectionConfig 新增線路連線。
此外,執行 Set-AzExpressRouteCircuitPeeringConfig 之後,您必須呼叫 Set-AzExpressRouteCircuit Cmdlet 來啟用設定。
範例
範例 1:將線路連線資源更新至現有的 ExpressRoute 線路
$circuit_init = Get-AzExpressRouteCircuit -Name $initiatingCircuitName -ResourceGroupName $rg
$circuit_peer = Get-AzExpressRouteCircuit -Name $peeringCircuitName -ResourceGroupName $rg
$addressSpace = 'aa:bb::0/125'
$addressPrefixType = 'IPv6'
Set-AzExpressRouteCircuitConnectionConfig -Name $circuitConnectionName -ExpressRouteCircuit $circuit_init -PeerExpressRouteCircuitPeering $circuit_peer.Peerings[0].Id -AddressPrefix $addressSpace -AddressPrefixType $addressPrefixType -AuthorizationKey $circuit_peer.Authorizations[0].AuthorizationKey
Set-AzExpressRouteCircuit -ExpressRouteCircuit $circuit_init
範例 2:使用管道設定現有 ExpressRoute 線路的線路連線設定
$circuit_peer = Get-AzExpressRouteCircuit -Name $peeringCircuitName -ResourceGroupName $rg
$addressSpace = '60.0.0.0/29'
Get-AzExpressRouteCircuit -Name $initiatingCircuitName -ResourceGroupName $rg|Set-AzExpressRouteCircuitConnectionConfig -Name $circuitConnectionName -PeerExpressRouteCircuitPeering $circuit_peer.Peerings[0].Id -AddressPrefix $addressSpace -AuthorizationKey $circuit_peer.Authorizations[0].AuthorizationKey |Set-AzExpressRouteCircuit
參數
-AddressPrefix
最少 /29 客戶位址空間,可在 IPv4 通道的 Express Route 線路之間建立 VxLan 通道。
或至少 /125 客戶位址空間,以在 IPv6 通道的 Express Route 線路之間建立 VxLan 通道。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | 3 |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-AddressPrefixType
指定位址前置詞所屬的位址系列。
參數屬性
| 類型: | String
|
| 預設值: | IPv4 |
| 接受的值: | IPv4, IPv6 |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-AuthorizationKey
授權金鑰以對等另一個訂用帳戶中的 Express Route 線路。 可以使用現有命令建立對等電路上的授權。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ExpressRouteCircuit
正在修改的 ExpressRoute 線路。 這是 Get-AzExpressRouteCircuit Cmdlet 所傳回的 Azure 物件。
參數屬性
參數集
(All)
| Position: | 1 |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-Name
要新增的電路連線資源名稱。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | 0 |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-PeerExpressRouteCircuitPeering
遠端線路專用對等互連的資源識別碼,將與目前線路對等互連。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
SetByResourceId
| Position: | 2 |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 指令未執行。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。
輸出