az stack-hci-vm network nsg
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 nsg command. Learn more about extensions.
Manage Network Security Groups (NSGs).
Commands
Name | Description | Type | Status |
---|---|---|---|
az stack-hci-vm network nsg create |
Create a network security group. |
Extension | GA |
az stack-hci-vm network nsg delete |
Delete a network security group. |
Extension | GA |
az stack-hci-vm network nsg list |
List network security groups. |
Extension | GA |
az stack-hci-vm network nsg rule |
Manage network security group rules. |
Extension | GA |
az stack-hci-vm network nsg rule create |
Create a network security group rule. |
Extension | GA |
az stack-hci-vm network nsg rule delete |
Delete a network security group rule. |
Extension | GA |
az stack-hci-vm network nsg rule list |
List all rules in a network security group. |
Extension | GA |
az stack-hci-vm network nsg rule show |
Get the details of a network security group rule. |
Extension | GA |
az stack-hci-vm network nsg rule update |
Update a network security group rule. |
Extension | GA |
az stack-hci-vm network nsg show |
Get information about a network security group. |
Extension | GA |
az stack-hci-vm network nsg update |
Update a network security group. |
Extension | GA |
az stack-hci-vm network nsg create
Create a network security group.
az stack-hci-vm network nsg create --custom-location
--name
--resource-group
[--location]
[--polling-interval]
[--tags]
Examples
Create an NSG in a resource group with tags.
az stack-hci-vm network nsg create -g MyResourceGroup -n MyNsg --tags foo=bar --custom-location $customLocationId
Required Parameters
The ID of the extended location.
Name of the network security group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
If location is not specified, the location of the resource group is used.
ARM polling interval for long running operations.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stack-hci-vm network nsg delete
Delete a network security group.
az stack-hci-vm network nsg delete [--ids]
[--name]
[--polling-interval]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete an NSG in a resource group.
az stack-hci-vm network nsg delete -g MyResourceGroup -n MyNsg
Optional Parameters
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.
Name of the network security group.
ARM polling interval for long running operations.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stack-hci-vm network nsg list
List network security groups.
az stack-hci-vm network nsg list [--resource-group]
Examples
List all NSGs in a resoure group
az stack-hci-vm network nsg list -g MyResourceGroup
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stack-hci-vm network nsg show
Get information about a network security group.
az stack-hci-vm network nsg show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Delete an NSG in a resource group.
az stack-hci-vm network nsg show -g MyResourceGroup -n MyNsg
Optional Parameters
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.
Name of the network security group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az stack-hci-vm network nsg update
Update a network security group.
This command can only be used to update the tags of an NSG. Name and resource group are immutable and cannot be updated.
az stack-hci-vm network nsg update --name
--resource-group
[--add]
[--force-string]
[--remove]
[--set]
[--tags]
Examples
Delete an NSG in a resource group.
az stack-hci-vm network nsg update -g MyResourceGroup -n MyNsg --tags foo=bar
Required Parameters
Name of the network security group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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>
.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.