Share via


az sf managed-cluster network-security-rule

Manage network security rules of a managed cluster.

Commands

Name Description Type Status
az sf managed-cluster network-security-rule add

Add a network security rule to a managed cluster.

Core GA
az sf managed-cluster network-security-rule delete

Delete a network security rule from a managed cluster.

Core GA
az sf managed-cluster network-security-rule get

Get a network security rule to a managed cluster.

Core GA
az sf managed-cluster network-security-rule list

List network security rules in a cluster.

Core GA
az sf managed-cluster network-security-rule update

Update a network security rule to a managed cluster.

Core GA

az sf managed-cluster network-security-rule add

Add a network security rule to a managed cluster.

az sf managed-cluster network-security-rule add --cluster-name
                                                --resource-group
                                                [--access {allow, deny}]
                                                [--description]
                                                [--dest-addr-prefix]
                                                [--dest-addr-prefixes]
                                                [--dest-port-range]
                                                [--dest-port-ranges]
                                                [--direction {inbound, outbound}]
                                                [--name]
                                                [--priority]
                                                [--protocol {ah, any, esp, http, https, icmp, tcp, udp}]
                                                [--source-addr-prefix]
                                                [--source-addr-prefixes]
                                                [--source-port-range]
                                                [--source-port-ranges]

Examples

Add network security rule with multiple source and destination address prefixes.

az sf managed-cluster network-security-rule add -g testRG -c testCluster --name 'network security rule name' --access allow --description 'network security rule description' --direction inbound --protocol tcp --priority 1200           --source-port-ranges 1-1000 --dest-port-ranges 1-65535 --source-addr-prefixes 167.220.242.0/27 167.220.0.0/23 131.107.132.16/28 167.220.81.128/26 --dest-addr-prefixes 194.69.104.0/25 194.69.119.64/26 167.220.249.128/26 255.255.255.255/32

Add network security rule with single source and destination address prefix.

az sf managed-cluster network-security-rule add -g testRG -c testCluster --name 'network security rule name' --access deny --description 'network security rule description' --direction inbound --protocol any --priority 1300           --source-port-range * --dest-port-ranges 19000 19080 --source-addr-prefix Internet --dest-addr-prefix *

Required Parameters

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--resource-group -g

Specify the resource group name. 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.

--access

Allows or denies network traffic.

Property Value
Accepted values: allow, deny
--description

Network security rule description.

--dest-addr-prefix

The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

--dest-addr-prefixes

CIDR or destination IP ranges. A single or space separated list of destination address prefixes.

--dest-port-range

The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

--dest-port-ranges

A single or space separated list of destination port ranges.

--direction

Network security rule direction.

Property Value
Accepted values: inbound, outbound
--name

Network security rule name.

--priority

Integer that shows priority for rule.

--protocol

Network protocol.

Property Value
Accepted values: ah, any, esp, http, https, icmp, tcp, udp
--source-addr-prefix

The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

--source-addr-prefixes

The CIDR or source IP ranges. A single or space separated list of source address prefixes.

--source-port-range

The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

--source-port-ranges

A single or space separated list of source port ranges.

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 sf managed-cluster network-security-rule delete

Delete a network security rule from a managed cluster.

az sf managed-cluster network-security-rule delete --cluster-name
                                                   --name
                                                   --resource-group

Examples

Delete network security rule.

az sf managed-cluster network-security-rule delete -g testRG -c testCluster --name 'network security rule name'

Required Parameters

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--name

Network security rule name.

--resource-group -g

Specify the resource group name. 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 sf managed-cluster network-security-rule get

Get a network security rule to a managed cluster.

az sf managed-cluster network-security-rule get --cluster-name
                                                --name
                                                --resource-group

Examples

Get network security rule.

az sf managed-cluster network-security-rule get -g testRG -c testCluster --name 'network security rule name'

Required Parameters

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--name

Network security rule name.

--resource-group -g

Specify the resource group name. 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 sf managed-cluster network-security-rule list

List network security rules in a cluster.

az sf managed-cluster network-security-rule list --cluster-name
                                                 --resource-group

Examples

List network security rules.

az sf managed-cluster network-security-rule list -g testRG -c testCluster

Required Parameters

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--resource-group -g

Specify the resource group name. 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 sf managed-cluster network-security-rule update

Update a network security rule to a managed cluster.

az sf managed-cluster network-security-rule update --cluster-name
                                                   --name
                                                   --resource-group
                                                   [--access {allow, deny}]
                                                   [--description]
                                                   [--dest-addr-prefixes]
                                                   [--dest-port-ranges]
                                                   [--direction {inbound, outbound}]
                                                   [--priority]
                                                   [--protocol {ah, any, esp, http, https, icmp, tcp, udp}]
                                                   [--source-addr-prefixes]
                                                   [--source-port-ranges]

Examples

Update network security rule.

az sf managed-cluster network-security-rule update -g testRG -c testCluster --name 'network security rule name' --access allow --description 'network security rule description' --direction inbound --protocol tcp --priority 1200           --source-port-ranges 1-1000 --dest-port-ranges 1-65535 --source-addr-prefixes 167.220.242.0/27 167.220.0.0/23 131.107.132.16/28 167.220.81.128/26 --dest-addr-prefixes 194.69.104.0/25 194.69.119.64/26 167.220.249.128/26 255.255.255.255/32

Required Parameters

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--name

Network security rule name.

--resource-group -g

Specify the resource group name. 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.

--access

Allows or denies network traffic.

Property Value
Accepted values: allow, deny
--description

Network security rule description.

--dest-addr-prefixes

CIDR or destination IP ranges. A single or space separated list of destination address prefixes.

--dest-port-ranges

A single or space separated list of destination port ranges.

--direction

Network security rule direction.

Property Value
Accepted values: inbound, outbound
--priority

Integer that shows priority for rule.

--protocol

Network protocol.

Property Value
Accepted values: ah, any, esp, http, https, icmp, tcp, udp
--source-addr-prefixes

The CIDR or source IP ranges. A single or space separated list of source address prefixes.

--source-port-ranges

A single or space separated list of source port ranges.

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