Share via


az network virtual-appliance inbound-security-rule

Manage Azure Network Virtual Appliance Inbound Security Rules.

Commands

Name Description Type Status
az network virtual-appliance inbound-security-rule create

Create the specified Network Virtual Appliance Inbound Security Rules.

Core GA
az network virtual-appliance inbound-security-rule show

Get the available specified Network Virtual Appliance Inbound Security Rules Collection.

Core GA

az network virtual-appliance inbound-security-rule create

Create the specified Network Virtual Appliance Inbound Security Rules.

az network virtual-appliance inbound-security-rule create --name
                                                          --nva-name
                                                          --resource-group
                                                          [--id]
                                                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                          [--rule-type {AutoExpire, Permanent}]
                                                          [--rules]

Examples

Create Inbound Security Rule of Permanent Rule Type

az network virtual-appliance inbound-security-rule create  --network-virtual-appliance-name "MyName" -g "MyRG" --subscription {subID} --rule-type "Permanent" --name "PermanentRuleCollection" --rules "[{name:'inboundRule',protocol:'TCP',destination-port-ranges:['80-120'],applies-on:['slbIP'],source-address-prefix:'*'}]"

Create Inbound Security Rule of AutoExpire Rule Type

az network virtual-appliance inbound-security-rule create  --network-virtual-appliance-name "MyName" -g "MyRG" --subscription {subID} --rule-type "AutoExpire" --name "TemporaryRuleCollection" --rules "[{name:'inboundRule',protocol:'TCP',destination-port-ranges:['80-120'],applies-on:['publicnicipconfig'],source-address-prefix:'20.0.0.0/32'}]"

Required Parameters

--name --rule-collection-name -n

The name of security rule collection.

--nva-name

The name of the Network Virtual Appliance.

--resource-group -g

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

Optional Parameters

--id

Resource ID.

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--rule-type

Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule.

Accepted values: AutoExpire, Permanent
--rules

List of allowed rules. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az network virtual-appliance inbound-security-rule show

Get the available specified Network Virtual Appliance Inbound Security Rules Collection.

az network virtual-appliance inbound-security-rule show [--ids]
                                                        [--name]
                                                        [--nva-name]
                                                        [--resource-group]
                                                        [--subscription]

Examples

Get Inbound Security Rule

az network virtual-appliance inbound-security-rule show --nva-name "MyName" -g "MyRG" --subscription {subID} --name "InboundRuleCollection"

Optional Parameters

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

--name --rule-collection-name -n

The name of security rule collection.

--nva-name

The name of the Network Virtual Appliance.

--resource-group -g

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.