New-AzApplicationGatewayFirewallCustomRule

Uygulama ağ geçidi güvenlik duvarı ilkesi için yeni bir özel kural oluşturur.

Syntax

New-AzApplicationGatewayFirewallCustomRule
   -Name <String>
   -Priority <Int32>
   [-RateLimitDuration <String>]
   [-RateLimitThreshold <Int32>]
   -RuleType <String>
   -MatchCondition <PSApplicationGatewayFirewallCondition[]>
   [-GroupByUserSession <PSApplicationGatewayFirewallCustomRuleGroupByUserSession[]>]
   -Action <String>
   [-State <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

New-AzApplicationGatewayFirewallCustomRule, güvenlik duvarı ilkesi için özel bir kural oluşturur.

Örnekler

Örnek 1

New-AzApplicationGatewayFirewallCustomRule -Name example-rule -Priority 1 -RuleType MatchRule -MatchCondition $condtion -Action Allow

Name                : example-rule
Priority            : 1
RuleType            : MatchRule
MatchConditions     : {Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCondition}
Action              : Allow
State               : Enabled
MatchConditionsText : [
                        {
                          "MatchVariables": [
                            {
                              "VariableName": "RequestHeaders",
                              "Selector": "Malicious-Header"
                            }
                          ],
                          "OperatorProperty": "Any",
                          "NegationConditon": false
                        }
                      ]

Komutu, example-rule, priority 1 adlı yeni bir özel kural oluşturur ve kural türü koşul değişkeninde tanımlanan koşula sahip MatchRule olur ve eylem izin verir.

Örnek 2

New-AzApplicationGatewayFirewallCustomRule -Name example-rule -Priority 2 -RuleType MatchRule -MatchCondition $condition -Action Allow -State Disabled

Name                : example-rule
Priority            : 2
RuleType            : MatchRule
MatchConditions     : {Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCondition}
Action              : Allow
State               : Disabled
MatchConditionsText : [
                        {
                          "MatchVariables": [
                            {
                              "VariableName": "RequestHeaders",
                              "Selector": "Malicious-Header"
                            }
                          ],
                          "OperatorProperty": "Any",
                          "NegationConditon": false
                        }
                      ]

Komut, örnek-kural, durum Devre Dışı, öncelik 2 olarak yeni bir özel kural oluşturur ve kural türü koşul değişkeninde tanımlanan koşula sahip MatchRule olur; eylem izin verir.

Örnek 3

New-AzApplicationGatewayFirewallCustomRule -Name RateLimitRule3 -Priority 3 -RateLimitDuration OneMin -RateLimitThreshold 10 -RuleType RateLimitRule -MatchCondition $condition -GroupByUserSession $groupbyUserSes -Action Allow -State Disabled

Name                : RateLimitRule3
Priority            : 3
RateLimitDuration   : OneMin
RateLimitThreshold  : 10
RuleType            : RateLimitRule
MatchConditions     : {Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCondition}
GroupByUserSession  : {Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCustomRuleGroupByUserSession}
Action              : Allow
State               : Disabled
MatchConditionsText : [
                        {
                          "MatchVariables": [
                            {
                              "VariableName": "RequestHeaders",
                              "Selector": "Malicious-Header"
                            }
                          ],
                          "OperatorProperty": "Any",
                          "NegationConditon": false
                        }
                      ]
GroupByUserSessionText : [
                        {
                          "groupByVariables": [
                            {
                              "variableName": "ClientAddr"
                            }
                          ]
                        }
                      ]

Komut, State as Disabled, priority 3, RateLimitDuration OneMin, RateLimitThreshold 10 olarak RateLimitRule adlı yeni bir özel kural oluşturur ve kural türü koşul değişkeninde tanımlanan koşula sahip RateLimitRule olur; eylem, GroupByUserSession koşul değişkeninde tanımlanan GroupByUserSession işlevine izin verir.

Parametreler

-Action

Eylemlerin Türü.

Type:String
Accepted values:Allow, Block, Log
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Azure ile iletişim için kullanılan kimlik bilgileri, hesap, kiracı ve abonelik.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GroupByUserSession

Eşleşme koşullarının listesi.

Type:PSApplicationGatewayFirewallCustomRuleGroupByUserSession[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MatchCondition

Eşleşme koşullarının listesi.

Type:PSApplicationGatewayFirewallCondition[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Kuralın Adı.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Priority

Kuralın önceliğini açıklar. Daha düşük değere sahip kurallar, daha yüksek bir değere sahip kurallardan önce değerlendirilir.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RateLimitDuration

Hız Sınırı ilkesinin uygulanacağı süreyi açıklar. Yalnızca ruleType RateLimitRule olduğunda uygulanır.

Type:String
Accepted values:OneMin, FiveMins
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RateLimitThreshold

Hız sınırı eşiğini açıklar. Yalnızca ruleType RateLimitRule olduğunda uygulanır.Bu değer için kabul edilen aralık 1 - 5000'dir.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RuleType

Kuralın türünü açıklar.

Type:String
Accepted values:MatchRule, RateLimitRule
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-State

Özel kuralın durum değişkeni.

Type:String
Accepted values:Disabled, Enabled
Position:Named
Default value:Enabled
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Girişler

None

Çıkışlar

PSApplicationGatewayFirewallCustomRule