Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-AzApplicationGatewayFirewallPolicySetting
- Module:
- Az.Network Module
Creates a policy setting for the firewall policy
Syntax
Default (Default)
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.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-CustomBlockResponseStatusCode
Custom block response status code in policy settings of the firewall policy.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-DisableFileUploadEnforcement
Disable file upload enforcement limits for WAF.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DisableRequestBodyCheck
Disables the requestBodyCheck in policy settings of the firewall policy.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DisableRequestBodyEnforcement
Disable request body enforcement limits for WAF.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-JSChallengeCookieExpirationInMins
Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-LogScrubbing
To scrub sensitive log fields
Parameter properties
| Type: | PSApplicationGatewayFirewallPolicyLogScrubbingConfiguration |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-MaxFileUploadInMb
Maximum fileUpload size in MB.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-MaxRequestBodySizeInKb
MaxRequestBodySizeInKb in policy settings of the firewall policy.
Parameter properties
| Type: | Int32 |
| Default value: | 128 |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Mode
Firewall Mode in policy settings of the firewall policy.
Parameter properties
| Type: | String |
| Default value: | Detection |
| Accepted values: | Prevention, Detection |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-RequestBodyInspectLimitInKB
Max inspection limit in KB for request body inspection.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-State
State variable in policy settings of the firewall policy.
Parameter properties
| Type: | String |
| Default value: | Enabled |
| Accepted values: | Disabled, Enabled |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
PSApplicationGatewayFirewallPolicySettings
Azure PowerShell
Feedback
Was this page helpful?
