Set-AzApplicationGatewayWebApplicationFirewallConfiguration
Modifies the WAF configuration of an application gateway.
Set-AzApplicationGatewayWebApplicationFirewallConfiguration
-ApplicationGateway <PSApplicationGateway>
-Enabled <Boolean>
-FirewallMode <String>
[-RuleSetType <String>]
[-RuleSetVersion <String>]
[-DisabledRuleGroup <PSApplicationGatewayFirewallDisabledRuleGroup[]>]
[-RequestBodyCheck <Boolean>]
[-MaxRequestBodySizeInKb <Int32>]
[-FileUploadLimitInMb <Int32>]
[-Exclusion <PSApplicationGatewayFirewallExclusion[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
The Set-AzApplicationGatewayWebApplicationFirewallConfiguration cmdlet modifies the web application firewall (WAF) configuration of an application gateway.
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
Set-AzApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway $AppGw -Enabled $True -FirewallMode "Detection" -RuleSetType "OWASP" -RuleSetVersion "3.0"
The first command gets the application gateway named ApplicationGateway01 and then stores it in the $AppGw variable. The second command enables the firewall configuration for the application gateway stored in $AppGw and sets the firewall mode to "Detection", RuleSetType to "OWASP" and the RuleSetVersion to "3.0".
Specifies an application gateway object. You can use the Get-AzApplicationGateway cmdlet to get an application gateway object.
Type: | PSApplicationGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The disabled rule groups.
Type: | PSApplicationGatewayFirewallDisabledRuleGroup[] |
Aliases: | DisabledRuleGroups |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates whether the web application firewall is enabled.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The exclusion lists.
Type: | PSApplicationGatewayFirewallExclusion[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Max file upload limit in MB.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the web application firewall mode. The acceptable values for this parameter are:
- Detection
- Prevention
Type: | String |
Accepted values: | Detection, Prevention |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Max request body size in KB.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Whether request body is checked or not.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The type of the web application firewall rule set. The acceptable values for this parameter are:
- OWASP
Type: | String |
Accepted values: | OWASP |
Position: | Named |
Default value: | OWASP |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The version of the rule set type.
Type: | String |
Position: | Named |
Default value: | 3.0 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Feedback zu Azure PowerShell
Azure PowerShell ist ein Open Source-Projekt. Wählen Sie einen Link aus, um Feedback zu geben: