New-AzApplicationGatewayFirewallPolicySetting
Creates a policy setting for the firewall policy
Syntax
New-AzApplicationGatewayFirewallPolicySetting
[-Mode <String>]
[-State <String>]
[-DisableRequestBodyEnforcement <Boolean>]
[-RequestBodyInspectLimitInKB <Int32>]
[-DisableRequestBodyCheck]
[-MaxRequestBodySizeInKb <Int32>]
[-DisableFileUploadEnforcement <Boolean>]
[-MaxFileUploadInMb <Int32>]
[-CustomBlockResponseStatusCode <Int32>]
[-CustomBlockResponseBody <String>]
[-LogScrubbing <PSApplicationGatewayFirewallPolicyLogScrubbingConfiguration>]
[-JSChallengeCookieExpirationInMins <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzApplicationGatewayFirewallPolicySetting creates a policy settings for a firewall policy.
Examples
Example 1
$condition = New-AzApplicationGatewayFirewallPolicySetting -State $enabledState -Mode $enabledMode -DisableRequestBodyCheck -MaxFileUploadInMb $fileUploadLimitInMb -MaxRequestBodySizeInKb $maxRequestBodySizeInKb
The command creates a policy setting with state as $enabledState, mode as $enabledMode, RequestBodyCheck as false, FileUploadLimitInMb as $fileUploadLimitInMb and MaxRequestBodySizeInKb as $maxRequestBodySizeInKb. The new policySettings is stored to $condition.
Example 2
$condition = New-AzApplicationGatewayFirewallPolicySetting -State $enabledState -Mode $enabledMode -DisableRequestBodyCheck -MaxFileUploadInMb $fileUploadLimitInMb -MaxRequestBodySizeInKb $maxRequestBodySizeInKb -LogScrubbing $logScrubbingRuleConfig
The command creates a policy setting with state as $enabledState, mode as $enabledMode, RequestBodyCheck as false, FileUploadLimitInMb as $fileUploadLimitInMb and MaxRequestBodySizeInKb as $maxRequestBodySizeInKb with a scrubbing rule as $logScrubbingRuleConfig. The new policySettings is stored to $condition.
Example 3
$condition = New-AzApplicationGatewayFirewallPolicySetting -State $enabledState -Mode $enabledMode -DisableRequestBodyEnforcement true -RequestBodyInspectLimitInKB 2000 -DisableRequestBodyCheck -MaxFileUploadInMb $fileUploadLimitInMb -DisableFileUploadEnforcement true -MaxRequestBodySizeInKb $maxRequestBodySizeInKb
The command creates a policy setting with state as $enabledState, mode as $enabledMode, RequestBodyEnforcement as false, RequestBodyInspectLimitInKB as 2000, RequestBodyCheck as false, FileUploadLimitInMb as $fileUploadLimitInMb, FileUploadEnforcement as false and MaxRequestBodySizeInKb as $maxRequestBodySizeInKb. The new policySettings is stored to $condition.
Example 4
$condition = New-AzApplicationGatewayFirewallPolicySetting -State $enabledState -Mode $enabledMode -DisableRequestBodyCheck -MaxFileUploadInMb $fileUploadLimitInMb -MaxRequestBodySizeInKb $maxRequestBodySizeInKb -JSChallengeCookieExpirationInMins $jsChallengeCookieExpirationInMins
The command creates a policy setting with state as $enabledState, mode as $enabledMode, RequestBodyCheck as false, FileUploadLimitInMb as $fileUploadLimitInMb and MaxRequestBodySizeInKb as $maxRequestBodySizeInKb, JSChallengeCookieExpirationInMins as $jsChallengeCookieExpirationInMins. The new policySettings is stored to $condition.
Parameters
-CustomBlockResponseBody
Custom Block Response Body in policy settings of the firewall policy.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CustomBlockResponseStatusCode
Custom block response status code in policy settings of the firewall policy.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
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 |
-DisableFileUploadEnforcement
Disable file upload enforcement limits for WAF.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableRequestBodyCheck
Diables the requestBodyCheck in policy settings of the firewall policy.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableRequestBodyEnforcement
Disable request body enforcement limits for WAF.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JSChallengeCookieExpirationInMins
Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogScrubbing
To scrub sensitive log fields
Type: | PSApplicationGatewayFirewallPolicyLogScrubbingConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxFileUploadInMb
Maximum fileUpload size in MB.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxRequestBodySizeInKb
MaxRequestBodySizeInKb in policy settings of the firewall policy.
Type: | Int32 |
Position: | Named |
Default value: | 128 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Mode
Firewall Mode in policy settings of the firewall policy.
Type: | String |
Accepted values: | Prevention, Detection |
Position: | Named |
Default value: | Detection |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RequestBodyInspectLimitInKB
Max inspection limit in KB for request body inspection.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-State
State variable in policy settings of the firewall policy.
Type: | String |
Accepted values: | Disabled, Enabled |
Position: | Named |
Default value: | Enabled |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None