Share via


az networkfabric taprule

注意

此參考是 Azure CLI 的 Managednetworkfabric 擴充功能的一部分(2.49.0 版或更高版本)。 擴充功能會在您第一次執行 az networkfabric taprule 命令時自動安裝。 深入了解擴充功能。

管理網路點選規則資源。

命令

名稱 Description 類型 狀態
az networkfabric taprule create

建立網路點選規則資源。

副檔名 GA
az networkfabric taprule delete

刪除網路點選規則資源。

副檔名 GA
az networkfabric taprule list

列出所提供資源群組或訂用帳戶中的所有網路點選規則。

副檔名 GA
az networkfabric taprule resync

使用最新的設定來重新同步處理 taprule。

副檔名 GA
az networkfabric taprule show

顯示所提供網路點選規則資源的詳細數據。

副檔名 GA
az networkfabric taprule update

更新網路點選規則資源。

副檔名 GA
az networkfabric taprule wait

將 CLI 置於等候狀態,直到符合條件為止。

副檔名 GA

az networkfabric taprule create

建立網路點選規則資源。

az networkfabric taprule create --configuration-type {File, Inline}
                                --resource-group
                                --resource-name
                                [--annotation]
                                [--dynamic-match-configurations]
                                [--location]
                                [--match-configurations]
                                [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                [--polling-interval-in-seconds {120, 30, 60, 90}]
                                [--tags]
                                [--tap-rules-url]

範例

建立網路點選規則,其組態類型為「檔案」。

az networkfabric taprule create --resource-group "example-rg" --location "westus3" --resource-name "example-networktaprule" --polling-interval-in-seconds 30 --configuration-type "File" --tap-rules-url "https://microsoft.com/<FileName>"

建立網路點選規則,其組態類型為「內嵌」。

az networkfabric taprule create --resource-group "example-rg" --location "westus3" --resource-name "example-networktaprule" --configuration-type "Inline" --match-configurations "[{matchConfigurationName:config1,sequenceNumber:10,ipAddressType:IPv4,matchConditions:[{encapsulationType:None,portCondition:{portType:SourcePort,layer4Protocol:TCP,ports:[100],portGroupNames:['example-portGroup1']},protocolTypes:[TCP],vlanMatchCondition:{vlans:['10'],innerVlans:['11-20']},ipCondition:{type:SourceIP,prefixType:Prefix,ipPrefixValues:['10.10.10.10/20']}}],actions:[{type:Drop,truncate:100,isTimestampEnabled:True,destinationId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup',matchConfigurationName:match1}]}]" --dynamic-match-configurations "[{ipGroups:[{name:'example-ipGroup1',ipAddressType:IPv4,ipPrefixes:['10.10.10.10/30']}],vlanGroups:[{name:'exmaple-vlanGroup',vlans:['10']}],portGroups:[{name:'example-portGroup1',ports:['100-200']}]}]"

您可以使用簡短語法 『??』來檢視特定父代下子參數的說明文字。 如需簡短語法的詳細資訊,請參閱 https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md 。

az networkfabric taprule create --match-configurations "??"

必要參數

--configuration-type

設定網路點選規則的輸入方法。 範例:檔案。

接受的值: File, Inline
--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--resource-name

網路點選規則的名稱。

選擇性參數

--annotation

基礎資源的描述。

--dynamic-match-configurations

動態比對組態的清單。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--location -l

未指定 Azure 區域的位置 如果未指定,將會使用資源群組的位置。

--match-configurations

比對組態的清單。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--polling-interval-in-seconds

輪詢間隔以秒為單位。 預設值為 30。 範例:60。

接受的值: 120, 30, 60, 90
--tags

資源標籤。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--tap-rules-url

網路點選規則檔案 URL。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az networkfabric taprule delete

刪除網路點選規則資源。

az networkfabric taprule delete [--ids]
                                [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                [--resource-group]
                                [--resource-name]
                                [--subscription]

範例

刪除網路點選規則

az networkfabric taprule delete --resource-group "example-rg" --resource-name "example-networktaprule"

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--resource-name

網路點選規則的名稱。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az networkfabric taprule list

列出所提供資源群組或訂用帳戶中的所有網路點選規則。

az networkfabric taprule list [--resource-group]

範例

列出資源群組的網路點選規則

az networkfabric taprule list --resource-group "example-rg"

列出訂用帳戶的網路點選規則

az networkfabric taprule list --subscription "<subscriptionId>"

選擇性參數

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az networkfabric taprule resync

使用最新的設定來重新同步處理 taprule。

az networkfabric taprule resync [--ids]
                                [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                [--resource-group]
                                [--resource-name]
                                [--subscription]

範例

重新同步作業

az networkfabric taprule resync --resource-group "example-rg" --resource-name "example-networktaprule"

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--resource-name

網路點選規則的名稱。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az networkfabric taprule show

顯示所提供網路點選規則資源的詳細數據。

az networkfabric taprule show [--ids]
                              [--resource-group]
                              [--resource-name]
                              [--subscription]

範例

顯示網路點選規則

az networkfabric taprule show --resource-group "example-rg" --resource-name "example-networktaprule"

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--resource-name

網路點選規則的名稱。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az networkfabric taprule update

更新網路點選規則資源。

az networkfabric taprule update [--annotation]
                                [--configuration-type {File, Inline}]
                                [--dynamic-match-configurations]
                                [--ids]
                                [--match-configurations]
                                [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                [--resource-group]
                                [--resource-name]
                                [--subscription]
                                [--tags]
                                [--tap-rules-url]

範例

更新網路點選規則

az networkfabric taprule update --resource-group "example-rg" --resource-name "example-networktaprule" --configuration-type "Inline" --match-configurations "[{matchConfigurationName:config1,sequenceNumber:10,ipAddressType:IPv4,matchConditions:[{encapsulationType:None,portCondition:{portType:SourcePort,layer4Protocol:TCP,ports:[100]},protocolTypes:[TCP],vlanMatchCondition:{vlans:['10'],innerVlans:['11-20']},ipCondition:{type:SourceIP,prefixType:Prefix,ipPrefixValues:['10.10.10.10/20']}}],actions:[{type:Drop,truncate:100,isTimestampEnabled:True,destinationId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup',matchConfigurationName:match1}]}]" --dynamic-match-configurations "[{ipGroups:[{name:'example-ipGroup1',ipAddressType:IPv4,ipPrefixes:['10.10.10.10/30']}],vlanGroups:[{name:'exmaple-vlanGroup',vlans:['10']}],portGroups:[{name:'example-portGroup1',ports:['100-200']}]}]"

您可以使用簡短語法 『??』來檢視特定父代下子參數的說明文字。 如需簡短語法的詳細資訊,請參閱 https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md 。

az networkfabric taprule update --match-configurations "??"

選擇性參數

--annotation

基礎資源的描述。

--configuration-type

設定網路點選規則的輸入方法。 範例:檔案。

接受的值: File, Inline
--dynamic-match-configurations

動態比對組態的清單。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--match-configurations

比對組態的清單。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--resource-name

網路點選規則的名稱。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--tags

資源標籤支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--tap-rules-url

網路點選規則檔案 URL。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az networkfabric taprule wait

將 CLI 置於等候狀態,直到符合條件為止。

az networkfabric taprule wait [--created]
                              [--custom]
                              [--deleted]
                              [--exists]
                              [--ids]
                              [--interval]
                              [--resource-group]
                              [--resource-name]
                              [--subscription]
                              [--timeout]
                              [--updated]

選擇性參數

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--interval

輪詢間隔以秒為單位。

預設值: 30
--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--resource-name

網路點選規則的名稱。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--timeout

以秒為單位的等候上限。

預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。