共用方式為


az networkfabric acl

Note

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

管理訪問控制清單資源。

命令

名稱 Description 類型 狀態
az networkfabric acl create

建立訪問控制清單資源。

Extension GA
az networkfabric acl delete

刪除訪問控制清單資源。

Extension GA
az networkfabric acl list

列出所提供資源群組或訂用帳戶中的所有訪問控制清單。

Extension GA
az networkfabric acl show

顯示所提供訪問控制清單資源的詳細數據。

Extension GA
az networkfabric acl update

更新存取控制清單資源。

Extension GA
az networkfabric acl wait

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

Extension GA

az networkfabric acl create

建立訪問控制清單資源。

az networkfabric acl create --configuration-type {File, Inline}
                            --resource-group
                            --resource-name
                            [--acl-type {ControlPlaneAcl, ControlPlaneTrafficPolicy, Management, Tenant}]
                            [--acls-url]
                            [--annotation]
                            [--control-plane-acl-configuration --cp-acl-config]
                            [--default-action {Deny, Permit}]
                            [--device-role {CE, ManagementSwitch, NPB, ToR}]
                            [--dynamic-match-configs --dynamic-match-configurations]
                            [--global-access-control-list-actions --global-acl-actions]
                            [--location]
                            [--match-configs --match-configurations]
                            [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                            [--tags]

範例

建立組態類型為 「File」 的訪問控制清單。

az networkfabric acl create --resource-group "example-rg" --location "westus3" --resource-name "example-accesscontrollist" --configuration-type "File" --acls-url "https://ACL-Storage-URL"

建立設定類型為 「內嵌」的訪問控制清單。

az networkfabric acl create --resource-group "example-rg" --location "westus3" --resource-name "example-accesscontrollist" --configuration-type "Inline" --default-action "Permit" --dynamic-match-configurations "[{ipGroups:[{name:'example-ipGroup',ipAddressType:IPv4,ipPrefixes:['10.20.3.1/20']}],vlanGroups:[{name:'example-vlanGroup',vlans:['20-30']}],portGroups:[{name:'example-portGroup',ports:['100-200']}]}]" --match-configurations "[{matchConfigurationName:'example-match',sequenceNumber:123,ipAddressType:IPv4,matchConditions:[{etherTypes:['0x1'],fragments:['0xff00-0xffff'],ipLengths:['4094-9214'],ttlValues:[23],dscpMarkings:[32],portCondition:{flags:[established],portType:SourcePort,layer4Protocol:TCP,ports:['1-20'],portGroupNames:['example-portGroup']},protocolTypes:[TCP],vlanMatchCondition:{vlans:['20-30'],innerVlans:[30],vlanGroupNames:['example-vlanGroup']},ipCondition:{type:SourceIP,prefixType:Prefix,ipPrefixValues:['10.20.20.20/12'],ipGroupNames:['example-ipGroup']}}],actions:[{type:Count,counterName:'example-counter'}]}]"

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

az networkfabric acl create --dynamic-match-configurations "??"

必要參數

--configuration-type

設定訪問控制清單的輸入方法。

屬性
參數群組: Properties Arguments
接受的值: File, Inline
--resource-group -g

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

--resource-name

訪問控制清單的名稱。

選擇性參數

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

--acl-type

訪問控制清單 (ACL) 類型。

屬性
參數群組: Properties Arguments
接受的值: ControlPlaneAcl, ControlPlaneTrafficPolicy, Management, Tenant
--acls-url

訪問控制清單檔案URL。

屬性
參數群組: Properties Arguments
--annotation

切換組態描述。

屬性
參數群組: Properties Arguments
--control-plane-acl-configuration --cp-acl-config

存取控制清單 (ACL) 設定。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

屬性
參數群組: Properties Arguments
--default-action

未比對任何條件時,必須套用的默認動作。 範例:允許 |否認。

屬性
參數群組: Properties Arguments
預設值: Permit
接受的值: Deny, Permit
--device-role

裝置角色。

屬性
參數群組: Properties Arguments
接受的值: CE, ManagementSwitch, NPB, ToR
--dynamic-match-configs --dynamic-match-configurations

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

屬性
參數群組: Properties Arguments
--global-access-control-list-actions --global-acl-actions

全域訪問控制清單 (ACL) 動作支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

屬性
參數群組: Properties Arguments
--location -l

未指定資源所在的地理位置,將會使用資源群組的位置。

屬性
參數群組: Resource Arguments
--match-configs --match-configurations

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

屬性
參數群組: Properties Arguments
--no-wait

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

屬性
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--tags

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

屬性
參數群組: Resource Arguments
全域參數
--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 networkfabric acl delete

刪除訪問控制清單資源。

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

範例

刪除訪問控制清單

az networkfabric acl delete --resource-group "example-rg" --resource-name "example-acl"

選擇性參數

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

--ids

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

屬性
參數群組: Resource Id Arguments
--no-wait

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

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

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

屬性
參數群組: Resource Id Arguments
--resource-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 networkfabric acl list

列出所提供資源群組或訂用帳戶中的所有訪問控制清單。

az networkfabric acl list [--max-items]
                          [--next-token]
                          [--resource-group]

範例

列出資源群組的訪問控制清單。

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

列出訂用帳戶的訪問控制清單。

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

選擇性參數

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

--max-items

命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的 --next-token 自變數中提供令牌值。

屬性
參數群組: Pagination Arguments
--next-token

標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。

屬性
參數群組: Pagination Arguments
--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 networkfabric acl show

顯示所提供訪問控制清單資源的詳細數據。

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

範例

顯示訪問控制清單

az networkfabric acl show --resource-group "example-rg" --resource-name "example-acl"

選擇性參數

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

--ids

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

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

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

屬性
參數群組: Resource Id Arguments
--resource-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 networkfabric acl update

更新存取控制清單資源。

az networkfabric acl update [--acl-type {ControlPlaneAcl, ControlPlaneTrafficPolicy, Management, Tenant}]
                            [--acls-url]
                            [--annotation]
                            [--configuration-type {File, Inline}]
                            [--control-plane-acl-configuration --cp-acl-config]
                            [--default-action {Deny, Permit}]
                            [--device-role {CE, ManagementSwitch, NPB, ToR}]
                            [--dynamic-match-configs --dynamic-match-configurations]
                            [--global-access-control-list-actions --global-acl-actions]
                            [--ids]
                            [--match-configs --match-configurations]
                            [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                            [--resource-group]
                            [--resource-name]
                            [--subscription]
                            [--tags]

範例

使用內嵌組態類型更新 ACL

az networkfabric acl update -g "example-rg" --resource-name "example-acl" --configuration-type "Inline" --default-action "Permit"  --dynamic-match-configurations "[{ipGroups:[{name:'example-ipGroup',ipAddressType:IPv4,ipPrefixes:['10.20.3.1/20']}],vlanGroups:[{name:'example-vlanGroup',vlans:['20-30']}],portGroups:[{name:'example-portGroup',ports:['100-200']}]}]" --match-configurations "[{matchConfigurationName:'example-match',sequenceNumber:123,ipAddressType:IPv4,matchConditions:[{etherTypes:['0x1'],fragments:['0xff00-0xffff'],ipLengths:['4094-9214'],ttlValues:[23],dscpMarkings:[32],portCondition:{flags:[established],portType:SourcePort,layer4Protocol:TCP,ports:['1-20'],portGroupNames:['example-portGroup']},protocolTypes:[TCP],vlanMatchCondition:{vlans:['20-30'],innerVlans:[30],vlanGroupNames:['example-vlanGroup']},ipCondition:{type:SourceIP,prefixType:Prefix,ipPrefixValues:['10.20.20.20/12'],ipGroupNames:['example-ipGroup']}}],actions:[{type:Count,counterName:'example-counter'}]}]"

選擇性參數

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

--acl-type

訪問控制清單 (ACL) 類型。

屬性
參數群組: Properties Arguments
接受的值: ControlPlaneAcl, ControlPlaneTrafficPolicy, Management, Tenant
--acls-url

訪問控制清單檔案URL。

屬性
參數群組: Properties Arguments
--annotation

切換組態描述。

屬性
參數群組: Properties Arguments
--configuration-type

設定訪問控制清單的輸入方法。

屬性
參數群組: Properties Arguments
接受的值: File, Inline
--control-plane-acl-configuration --cp-acl-config

存取控制清單 (ACL) 設定。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

屬性
參數群組: Properties Arguments
--default-action

未比對任何條件時,必須套用的默認動作。 範例:允許 |否認。

屬性
參數群組: Properties Arguments
接受的值: Deny, Permit
--device-role

裝置角色。

屬性
參數群組: Properties Arguments
接受的值: CE, ManagementSwitch, NPB, ToR
--dynamic-match-configs --dynamic-match-configurations

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

屬性
參數群組: Properties Arguments
--global-access-control-list-actions --global-acl-actions

全域訪問控制清單 (ACL) 動作支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

屬性
參數群組: Properties Arguments
--ids

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

屬性
參數群組: Resource Id Arguments
--match-configs --match-configurations

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

屬性
參數群組: Properties Arguments
--no-wait

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

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

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

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

訪問控制清單的名稱。

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

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

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

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

屬性
參數群組: Properties 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 networkfabric acl wait

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

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

選擇性參數

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

--created

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

屬性
參數群組: Wait Condition Arguments
預設值: False
--custom

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

屬性
參數群組: Wait Condition Arguments
--deleted

等到刪除為止。

屬性
參數群組: Wait Condition Arguments
預設值: False
--exists

等候資源存在。

屬性
參數群組: Wait Condition Arguments
預設值: False
--ids

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

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

輪詢間隔以秒為單位。

屬性
參數群組: Wait Condition Arguments
預設值: 30
--resource-group -g

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

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

訪問控制清單的名稱。

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

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

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

以秒為單位的等候上限。

屬性
參數群組: Wait Condition Arguments
預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

屬性
參數群組: Wait Condition Arguments
預設值: False
全域參數
--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