共用方式為


az networkfabric l2domain

備註

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

管理 L2 隔離網域資源。

命令

名稱 Description 類型 狀態
az networkfabric l2domain create

建立 L2 隔離網域資源。

擴充套件 GA
az networkfabric l2domain delete

刪除 L2 隔離網域資源。

擴充套件 GA
az networkfabric l2domain list

列出所提供資源群組或訂用帳戶中的所有 L2 隔離網域。

擴充套件 GA
az networkfabric l2domain show

顯示所提供 L2 隔離網域資源的詳細數據。

擴充套件 GA
az networkfabric l2domain update

更新 L2 隔離網域資源。

擴充套件 GA
az networkfabric l2domain update-admin-state

跨網狀架構或指定機架啟用隔離網域。

擴充套件 GA
az networkfabric l2domain wait

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

擴充套件 GA

az networkfabric l2domain create

建立 L2 隔離網域資源。

az networkfabric l2domain create --network-fabric-id
                                 --resource-group
                                 --resource-name
                                 --vlan-id
                                 [--annotation]
                                 [--extended-vlan {Disabled, Enabled}]
                                 [--location]
                                 [--mtu]
                                 [--network-to-network-interconnect-id]
                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                 [--tags]

範例

建立 L2 隔離網域

az networkfabric l2domain create --resource-group "example-rg" --resource-name "example-l2domain" --location "westus3" --nf-id "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/NetworkFabrics/example-fabricName" --vlan-id  501 --mtu 1500

必要參數

--network-fabric-id --nf-id

網路網狀架構的 ARM 資源識別碼。

--resource-group -g

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

--resource-name

L2 隔離網域的名稱。

--vlan-id

網路網狀架構的 Vlan 識別碼。 範例:501。

選擇性參數

--annotation

切換組態描述。

--extended-vlan

擴充 VLAN 狀態,預設值為 Disabled。

接受的值: Disabled, Enabled
預設值: Disabled
--location -l

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

--mtu

傳輸單位上限。 預設值為 1500。

預設值: 1500
--network-to-network-interconnect-id --nni-id

L2 ISD 資源之 networkToNetworkInterconnectId 的 ARM 資源標識符。

--no-wait

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

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

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

全域參數
--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 l2domain delete

刪除 L2 隔離網域資源。

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

範例

刪除 L2 隔離網域

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

選擇性參數

--ids

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

--no-wait

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

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

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

--resource-name

L2 隔離網域的名稱。

--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 l2domain list

列出所提供資源群組或訂用帳戶中的所有 L2 隔離網域。

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

範例

列出資源群組的 L2 隔離網域

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

列出訂用帳戶的 L2 隔離網域

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

選擇性參數

--max-items

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

--next-token

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

--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 l2domain show

顯示所提供 L2 隔離網域資源的詳細數據。

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

範例

顯示 L2 隔離網域

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

選擇性參數

--ids

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

--resource-group -g

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

--resource-name

L2 隔離網域的名稱。

--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 l2domain update

更新 L2 隔離網域資源。

az networkfabric l2domain update [--annotation]
                                 [--extended-vlan {Disabled, Enabled}]
                                 [--ids]
                                 [--mtu]
                                 [--network-to-network-interconnect-id]
                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                 [--resource-group]
                                 [--resource-name]
                                 [--subscription]
                                 [--tags]

範例

更新 L2 隔離網域

az networkfabric l2domain update --resource-group "example-rg" --resource-name "example-l2domain" --mtu 1500

選擇性參數

--annotation

切換組態描述。

--extended-vlan

擴充的 VLAN 狀態。

接受的值: Disabled, Enabled
--ids

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

--mtu

傳輸單位上限。 預設值為 1500。

--network-to-network-interconnect-id --nni-id

L2 ISD 資源之 networkToNetworkInterconnectId 的 ARM 資源標識符。

--no-wait

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

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

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

--resource-name

L2 隔離網域的名稱。

--subscription

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

--tags

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

全域參數
--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 l2domain update-admin-state

跨網狀架構或指定機架啟用隔離網域。

az networkfabric l2domain update-admin-state [--ids]
                                             [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                             [--resource-group]
                                             [--resource-ids]
                                             [--resource-name]
                                             [--state {Disable, Enable, UnderMaintenance}]
                                             [--subscription]

範例

更新 L2 隔離網域的系統管理狀態

az networkfabric l2domain update-admin-state --resource-group "example-rg" --resource-name "example-l2domain" --state "Enable"

選擇性參數

--ids

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

--no-wait

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

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

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

--resource-ids

網路網狀架構或網路機架資源標識符。支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--resource-name

L2 隔離網域的名稱。

--state

系統管理狀態。

接受的值: Disable, Enable, UnderMaintenance
--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 l2domain wait

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

az networkfabric l2domain 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

L2 隔離網域的名稱。

--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。