az stack-hci-vm network nic

Note

This reference is part of the stack-hci-vm extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az stack-hci-vm network nic command. Learn more about extensions.

Manage networkinterface with stack-hci-vm.

Commands

Name Description Type Status
az stack-hci-vm network nic create

Create a network interface.

Extension GA
az stack-hci-vm network nic create-from-local

Onboard a network interface attached to local failover cluster VM to Azure Local.

Extension Preview
az stack-hci-vm network nic delete

Delete a network interface.

Extension GA
az stack-hci-vm network nic list

List all network interfaces.

Extension GA
az stack-hci-vm network nic show

Get the details of a network interface.

Extension GA
az stack-hci-vm network nic update

Update a network interface.

Extension GA

az stack-hci-vm network nic create

Create a network interface.

az stack-hci-vm network nic create --custom-location
                                   --name
                                   --resource-group
                                   [--acquire-policy-token]
                                   [--bypass-sdn-policies {false, true}]
                                   [--change-reference]
                                   [--dns-servers]
                                   [--ip-address]
                                   [--ip-configurations]
                                   [--location]
                                   [--mac-address]
                                   [--network-security-group --nsg]
                                   [--polling-interval]
                                   [--subnet-id]
                                   [--tags]

Examples

Without ip configurations provided

az stack-hci-vm network nic create --resource-group "test-rg" --custom-location "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"  --location "West US2" --subnet-id "test-lnet" --ip-address "10.0.0.0" --name "test-nic"

Required Parameters

--custom-location

The ID of the custom location.

--name

Name of the network interface.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--bypass-sdn-policies

Bypass SDN Policies on the NIC.

Property Value
Default value: False
Accepted values: false, true
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--dns-servers

Space-separated list of DNS server IP addresses.

Usage: --dns-servers 10.220.32.16 10.220.32.17.

--ip-address

Ip_address - Private IP address of the IP configuration.

Usage: --ip-address "1.2.3.4".

--ip-configurations

IPConfigurations - A list of IPConfigurations of the network interface. Expected value: json-string/@json-file.

--location -l

If location is not specified, the location of the resource group is used.

--mac-address

MacAddress - The MAC address of the network interface.

--network-security-group --nsg

Name or ID of a network security group (NSG).

Usage: --network-security-group "myNSG".

--polling-interval

ARM polling interval for long running operations.

--subnet-id

ID of the subnet or network to create the network interface on.

Usage: --subnet-id "test-lnet" The subnet-id provided will be ignored if ip-configurations parameter is also provided.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az stack-hci-vm network nic create-from-local

Preview

This command is in preview and under development. This command is available only to customers participating in the invitation-only Azure Local private preview. It is not available for general use. Reference and support levels: https://aka.ms/CLI_refstatus

Onboard a network interface attached to local failover cluster VM to Azure Local.

This command is available only to customers participating in the invitation-only Azure Local private preview. It is not available for general use.

az stack-hci-vm network nic create-from-local --custom-location
                                              --mac-address
                                              --name
                                              --resource-group
                                              --subnet-id
                                              [--acquire-policy-token]
                                              [--change-reference]
                                              [--location]
                                              [--polling-interval]
                                              [--tags]

Examples

Onboard a network interface on failover cluster to Azure Local

az stack-hci-vm network nic create-from-local --resource-group "test-rg" --custom-location "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location" --name "test-nic" --subnet-id "test-lnet" --mac-address  "02:ee:00:00:04:04"

Required Parameters

--custom-location

The ID of the custom location.

--mac-address

MacAddress - The MAC address of the network interface.

--name

Name of the network interface.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subnet-id

ID of the subnet or network to create the network interface on.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--location -l

If location is not specified, the location of the resource group is used.

--polling-interval

ARM polling interval for long running operations.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az stack-hci-vm network nic delete

Delete a network interface.

az stack-hci-vm network nic delete [--acquire-policy-token]
                                   [--change-reference]
                                   [--ids]
                                   [--name]
                                   [--polling-interval]
                                   [--resource-group]
                                   [--subscription]
                                   [--yes]

Examples

DeleteNetworkInterface

az stack-hci-vm network nic delete --name "test-nic" --resource-group "test-rg"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the network interface.

Property Value
Parameter group: Resource Id Arguments
--polling-interval

ARM polling interval for long running operations.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az stack-hci-vm network nic list

List all network interfaces.

az stack-hci-vm network nic list [--resource-group]

Examples

ListNetworkInterfaceByResourceGroup

az stack-hci-vm network nic list --resource-group "test-rg"

ListNetworkInterfaceBySubscription

az stack-hci-vm network nic list

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az stack-hci-vm network nic show

Get the details of a network interface.

az stack-hci-vm network nic show [--ids]
                                 [--name]
                                 [--resource-group]
                                 [--subscription]

Examples

GetNetworkInterface

az stack-hci-vm network nic show --name "test-nic" --resource-group "test-rg"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the network interface.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az stack-hci-vm network nic update

Update a network interface.

az stack-hci-vm network nic update [--acquire-policy-token]
                                   [--add]
                                   [--bypass-sdn-policies {false, true}]
                                   [--change-reference]
                                   [--force-string]
                                   [--ids]
                                   [--name]
                                   [--network-security-group --nsg]
                                   [--remove]
                                   [--resource-group]
                                   [--set]
                                   [--subscription]
                                   [--tags]

Examples

UpdateNetworkInterface

az stack-hci-vm network nic update --tags additionalProperties="sample" --name "test-nic" --resource-group "test-rg" --network-security-group "myNSG"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--bypass-sdn-policies

Bypass SDN Policies on the NIC.

Property Value
Default value: False
Accepted values: false, true
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name

Name of the network interface.

Property Value
Parameter group: Resource Id Arguments
--network-security-group --nsg

Name or ID of a network security group (NSG).

Usage: --network-security-group "myNSG".

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False