az stack-hci-vm network nat inbound-rule

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 nat inbound-rule command. Learn more about extensions.

Manage inbound NAT rules with stack-hci-vm.

Commands

Name Description Type Status
az stack-hci-vm network nat inbound-rule create

Create an inbound NAT rule.

Extension GA
az stack-hci-vm network nat inbound-rule delete

Delete an inbound NAT rule.

Extension GA
az stack-hci-vm network nat inbound-rule list

List all inbound NAT rules in a NAT gateway.

Extension GA
az stack-hci-vm network nat inbound-rule show

Get the details of an inbound NAT rule.

Extension GA

az stack-hci-vm network nat inbound-rule create

Create an inbound NAT rule.

az stack-hci-vm network nat inbound-rule create --backend-ip-config
                                                --backend-port
                                                --frontend-port
                                                --name
                                                --nat-gateway-name
                                                --protocol
                                                --public-ip-address
                                                --resource-group
                                                [--acquire-policy-token]
                                                [--change-reference]
                                                [--custom-location]
                                                [--location]
                                                [--polling-interval]
                                                [--tags]

Examples

CreateInboundRule

az stack-hci-vm network nat inbound-rule create --resource-group "test-rg" --nat-gateway-name "test-nat" --name "sshRule" --location "eastus" --custom-location "/subscriptions/xxxx/resourceGroups/test-rg/providers/Microsoft.ExtendedLocation/customLocations/test-location" --protocol "Tcp" --frontend-port 2222 --backend-port 22 --backend-ip-config "/subscriptions/xxxx/resourceGroups/test-rg/providers/Microsoft.Network/networkInterfaces/vm1nic/ipConfigurations/ipconfig1" --public-ip-address "/subscriptions/xxxx/resourceGroups/test-rg/providers/Microsoft.Network/publicIPAddresses/test-pip1"

Required Parameters

--backend-ip-config

Resource ID of the backend IP configuration.

--backend-port

Backend port for the inbound rule.

--frontend-port

Frontend port for the inbound rule.

--name -n

Name of the inbound NAT rule.

--nat-gateway-name

Name of the NAT gateway.

--protocol

Protocol for the NAT rule. Allowed values: Tcp, Udp.

--public-ip-address

Resource ID of the public IP address for this NAT rule.

--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
--change-reference

The related change reference ID for this resource operation.

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

The ID of the custom location. If omitted, inherited from the parent NAT gateway.

--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 nat inbound-rule delete

Delete an inbound NAT rule.

az stack-hci-vm network nat inbound-rule delete --name
                                                --nat-gateway-name
                                                --resource-group
                                                [--acquire-policy-token]
                                                [--change-reference]
                                                [--polling-interval]
                                                [--yes]

Examples

DeleteInboundRule

az stack-hci-vm network nat inbound-rule delete --resource-group "test-rg" --nat-gateway-name "test-nat" --name "sshRule" --yes

Required Parameters

--name -n

Name of the inbound NAT rule.

--nat-gateway-name

Name of the NAT gateway.

--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
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--polling-interval

ARM polling interval for long running operations.

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

--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 nat inbound-rule list

List all inbound NAT rules in a NAT gateway.

az stack-hci-vm network nat inbound-rule list --nat-gateway-name
                                              --resource-group

Examples

ListInboundRules

az stack-hci-vm network nat inbound-rule list --resource-group "test-rg" --nat-gateway-name "test-nat"

Required Parameters

--nat-gateway-name

Name of the NAT gateway.

--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 nat inbound-rule show

Get the details of an inbound NAT rule.

az stack-hci-vm network nat inbound-rule show --name
                                              --nat-gateway-name
                                              --resource-group

Examples

ShowInboundRule

az stack-hci-vm network nat inbound-rule show --resource-group "test-rg" --nat-gateway-name "test-nat" --name "sshRule"

Required Parameters

--name -n

Name of the inbound NAT rule.

--nat-gateway-name

Name of the NAT gateway.

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