共用方式為


az network firewall network-rule

Note

此參考是 Azure CLI (2.75.0 版或更新版本) 的 azure-firewall 延伸模組的一部分。 擴充功能會在您第一次執行 az network firewall network-rule 命令時自動安裝深入了解擴充功能。

管理及設定 Azure 防火牆 網路規則。

命令

名稱 Description 類型 狀態
az network firewall network-rule collection

管理及設定 Azure 防火牆 網路規則集合。

Extension GA
az network firewall network-rule collection delete

刪除 Azure 防火牆 網路規則集合。

Extension GA
az network firewall network-rule collection list

列出 Azure 防火牆 網路規則集合。

Extension GA
az network firewall network-rule collection show

取得 Azure 防火牆 網路規則集合的詳細數據。

Extension GA
az network firewall network-rule create

建立 Azure 防火牆 網路規則。

Extension GA
az network firewall network-rule delete

刪除 Azure 防火牆 網路規則。 如果您想要刪除集合中的最後一個規則,請改為刪除集合。

Extension GA
az network firewall network-rule list

列出 Azure 防火牆 網路規則。

Extension GA
az network firewall network-rule show

取得 Azure 防火牆 網路規則的詳細數據。

Extension GA

az network firewall network-rule create

建立 Azure 防火牆 網路規則。

az network firewall network-rule create --collection-name
                                        --destination-ports
                                        --firewall-name
                                        --name
                                        --protocols {Any, ICMP, TCP, UDP}
                                        --resource-group
                                        [--action {Allow, Deny}]
                                        [--description]
                                        [--dest-addr --destination-addresses]
                                        [--destination-fqdns]
                                        [--destination-ip-groups]
                                        [--priority]
                                        [--source-addresses]
                                        [--source-ip-groups]

必要參數

--collection-name -c

要用來建立規則的集合名稱。 如果集合不存在,將會建立集合。

屬性
參數群組: Collection Arguments
--destination-ports

目的地埠的空間分隔清單。 使用 『*』 來比對全部。

--firewall-name -f

Azure 防火牆名稱。

--name -n

網路規則的名稱。

--protocols

以空格分隔的通訊協議清單。

屬性
接受的值: Any, ICMP, TCP, UDP
--resource-group -g

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--action

要套用至規則集合的動作。 只有在您要建立集合時,才提供 。

屬性
參數群組: Collection Arguments
接受的值: Allow, Deny
--description

規則描述。

--dest-addr --destination-addresses

目的地IP位址的空間分隔清單。 使用 『*』 來比對全部。

--destination-fqdns

目的地 FQDN 的空間分隔清單。

--destination-ip-groups

以空格分隔的目的地 IpGroups 名稱或資源識別碼清單。

--priority

規則集合的優先順序從 100 (高) 到 65000 (低)。 只有在您要建立集合時,才提供 。

屬性
參數群組: Collection Arguments
--source-addresses

來源IP位址的空間分隔清單。 使用 『*』 來比對全部。

--source-ip-groups

以空格分隔的來源 IpGroups 名稱或資源識別碼清單。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az network firewall network-rule delete

刪除 Azure 防火牆 網路規則。 如果您想要刪除集合中的最後一個規則,請改為刪除集合。

az network firewall network-rule delete [--collection-name]
                                        [--firewall-name]
                                        [--ids]
                                        [--name]
                                        [--resource-group]
                                        [--subscription]

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--collection-name -c

規則集合的名稱。

屬性
參數群組: Resource Id Arguments
--firewall-name -f

Azure 防火牆名稱。

屬性
參數群組: Resource Id Arguments
--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

網路規則的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az network firewall network-rule list

列出 Azure 防火牆 網路規則。

az network firewall network-rule list --collection-name
                                      --firewall-name
                                      --resource-group

必要參數

--collection-name -c

規則集合的名稱。

--firewall-name -f

Azure 防火牆名稱。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az network firewall network-rule show

取得 Azure 防火牆 網路規則的詳細數據。

az network firewall network-rule show [--collection-name]
                                      [--firewall-name]
                                      [--ids]
                                      [--name]
                                      [--resource-group]
                                      [--subscription]

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--collection-name -c

規則集合的名稱。

屬性
參數群組: Resource Id Arguments
--firewall-name -f

Azure 防火牆名稱。

屬性
參數群組: Resource Id Arguments
--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

網路規則的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False