共用方式為


az azurestackhci networkinterface

備註

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

命令群組 『azurestackhci』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

使用 azurestackhci 管理 networkinterface。

命令

名稱 Description 類型 狀態
az azurestackhci networkinterface create

建立網路介面。

擴充套件 實驗性的
az azurestackhci networkinterface delete

刪除網路介面。

擴充套件 實驗性的
az azurestackhci networkinterface list

列出所有網路介面。

擴充套件 實驗性的
az azurestackhci networkinterface show

取得網路介面的詳細數據。

擴充套件 實驗性的
az azurestackhci networkinterface update

更新網路介面。

擴充套件 實驗性的

az azurestackhci networkinterface create

實驗

命令群組 『azurestackhci』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立網路介面。

az azurestackhci networkinterface create --name
                                         --resource-group
                                         [--dns-servers]
                                         [--extended-location]
                                         [--gateway]
                                         [--ip-address]
                                         [--ip-allocation-method]
                                         [--ip-configurations]
                                         [--location]
                                         [--mac-address]
                                         [--prefix-length]
                                         [--subnet-id]
                                         [--tags]

範例

未提供IP組態

az azurestackhci networkinterface create --resource-group "test-rg" --extended-location name="/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location" type="CustomLocation" --location "West US2" --subnet-id "test-vnet" --gateway "sample_gateway" --prefix-length 16 --ip-address "10.0.0.0" --ip-allocation-method "Static" --name "test-nic"

必要參數

--name

網路介面的名稱。

--resource-group -g

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

選擇性參數

--dns-servers

DNS 伺服器 IP 位址的空間分隔清單。

使用方式:--dns-servers 10.220.32.16 10.220.32.17。

--extended-location

使用方式:--extended-location type=XX name=XX

type:擴充位置類型。 name:擴充位置名稱。

--gateway

網路介面的閘道。

使用量:--gateway “1.2.3.4”。

--ip-address

Ip_address - IP 組態的私人IP位址。

使用方式:--ip-address “1.2.3.4”。

--ip-allocation-method

Ip_allocation_method - 私人IP位址配置方法。 可能的值包括:靜態、動態。

使用方式:--ip-allocation-method “Static/Dynamic”。

--ip-configurations

IPConfigurations - 網路介面的IPConfiguration清單。 預期值:json-string/@json-file。

--location -l

位置。 值的來源:az account list-locations。 您可以使用 az configure --defaults location=<location>來設定預設位置。

--mac-address

MacAddress - 網路介面的 MAC 位址。

--prefix-length

網路介面Prefix_length。

使用方式:--prefix-length 16。

--subnet-id

要建立網路介面的子網或網路標識符。

使用方式:--subnet-id “test-vnet” 如果也提供 ip-configurations 參數,則會忽略提供的 subnet-id。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

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

實驗

命令群組 『azurestackhci』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除網路介面。

az azurestackhci networkinterface delete [--ids]
                                         [--name]
                                         [--resource-group]
                                         [--subscription]
                                         [--yes]

範例

DeleteNetworkInterface

az azurestackhci networkinterface delete --name "test-nic" --resource-group "test-rg"

選擇性參數

--ids

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

--name

網路介面的名稱。

--resource-group -g

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

--subscription

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

--yes -y

請勿提示確認。

預設值: 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。

az azurestackhci networkinterface list

實驗

命令群組 『azurestackhci』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出所有網路介面。

az azurestackhci networkinterface list [--resource-group]

範例

ListNetworkInterfaceByResourceGroup

az azurestackhci networkinterface list --resource-group "test-rg"

ListNetworkInterfaceBySubscription

az azurestackhci networkinterface list

選擇性參數

--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 azurestackhci networkinterface show

實驗

命令群組 『azurestackhci』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

取得網路介面的詳細數據。

az azurestackhci networkinterface show [--ids]
                                       [--name]
                                       [--resource-group]
                                       [--subscription]

範例

GetNetworkInterface

az azurestackhci networkinterface show --name "test-nic" --resource-group "test-rg"

選擇性參數

--ids

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

--name

網路介面的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<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 azurestackhci networkinterface update

實驗

命令群組 『azurestackhci』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

更新網路介面。

az azurestackhci networkinterface update [--ids]
                                         [--name]
                                         [--resource-group]
                                         [--subscription]
                                         [--tags]

範例

UpdateNetworkInterface

az azurestackhci networkinterface update --tags additionalProperties="sample" --name "test-nic" --resource-group "test-rg"

選擇性參數

--ids

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

--name

網路介面的名稱。

--resource-group -g

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

--subscription

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

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

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