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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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 of the network security group.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
ARM polling interval for long running operations.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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 |
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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 of the network security group.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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: | [] |
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 |
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: | [] |
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: | [] |
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |