NsgSecurityRule 对象本身。 withPriority public NsgSecurityRule withPriority(Integer priority) Set 获取或设置规则的优先级。 该值可以介于 100 和 4096 之间。 对于集合中的每个规则,优先级编号必须是唯一的。 优先级编号越低,规则优先级越高。 Parameters: ...
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Returns: the direction value. name public String name() Get the name property: Gets or sets the Security rule name. Returns: the name value. priority public Integer priority() Get the priority property: Gets ...
资源类型为 type = Microsoft.Network/networkSecurityGroups/securityRules inbound的属性名为 direction 3389端口的属性名为destinationPortRange 而IP地址属性名为sourceAddressPrefix 它们,就是组成Policy Rule的内容 第二步:编写 Policy Rule Policy的总体框架是: { "mode": "All", "policyRule": { "if": { /...
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Returns: the direction value. name public String name() Get the name property: Gets or sets the Security rule name. Returns: the name value. priority public Integer priority() Get the priority property: Gets ...
public NsgSecurityRule withName(String name) Set the name property: Gets or sets the Security rule name. Parameters: name - the name value to set. Returns: the NsgSecurityRule object itself.withPriority public NsgSecurityRule withPriority(Integer priority) Set the priority property: Gets or se...
"policyRule": { "if": { // 需要进行审计的条件 //1: 资源的类型是 Microsoft.Network/networkSecurityGroups/securityRules //2: 入站规则 Inbound //3: 端口是3389 或 22 //4: 如果不在允许的IP地址列表里,则需要审计 }, "then": {
{ "mode": "All", "policyRule": { "if": { // 需要进行审计的条件 //1: 资源的类型是 Microsoft.Network/networkSecurityGroups/securityRules //2: 入站规则 Inbound //3: 端口是3389 或 22 //4: 如果不在允许的IP地址列表里,则需要审计 }, "then": { "effect": "audit" } }, "parameters...
"policyRule": { "if": { //需要进行审计的条件 //1: 资源的类型是 Microsoft.Network/networkSecurityGroups/securityRules //2: 入站规则 Inbound //3: 端口是3389 或 22 //4: 如果不在允许的IP地址列表里,则需要审计 }, "then": { "effect":"audit" ...
Create security rules Portal PowerShell CLI SelectInbound security rulesfrom theSettingssection ofnsg-1. InInbound security rulespage, select+ Add. Create a security rule that allows ports 80 and 443 to theasg-webapplication security group. InAdd inbound security rulepage, enter or select the ...
-Access Allow -Protocol Tcp -Direction Inbound -Priority 300 -SourceAddressPrefix ` Internet -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 3389 $rule2 = New-AzNetworkSecurityRuleConfig -Name web-rule -Description "Allow HTTP" ` ...