共用方式為


New-AzRouteFilterRuleConfig

建立路由篩選條件的路由篩選規則。

語法

New-AzRouteFilterRuleConfig
   [-Force]
   -Name <String>
   -Access <String>
   -RouteFilterRuleType <String>
   -CommunityList <String[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

New-AzRouteFilterRuleConfig Cmdlet 會建立 Azure 路由篩選條件的路由篩選規則。

範例

範例 1

$rule1 = New-AzRouteFilterRuleConfig -Name "Rule01" -Access "Allow" -RouteFilterRuleType "Community" -CommunityList "12076:5040"

命令會建立新的路由篩選規則,並將其儲存在變數 $rule 1 中。

參數

-Access

路由篩選規則的存取權。 有效值為 Allow 或 Deny。

類型:String
接受的值:Allow, Deny
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-CommunityList

路由篩選將會篩選的社群值清單

類型:String[]
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Force

如果您想要覆寫資源,請勿要求確認

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Name

指定路由篩選規則的名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-RouteFilterRuleType

路由篩選規則類型。 有效值為:Community

類型:String
接受的值:Community
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

None

輸出

PSRouteFilterRule

備註

關鍵詞:azure、azurerm、arm、resource、management、manager、network、networking