Update-AzFrontDoorWafPolicy
Syntax
ByFieldsParameterSet (Default)
Update-AzFrontDoorWafPolicy
-ResourceGroupName <String>
-Name <String>
[-EnabledState <PSEnabledState>]
[-Mode <String>]
[-Customrule <PSCustomRule[]>]
[-ManagedRule <PSManagedRule[]>]
[-RedirectUrl <String>]
[-CustomBlockResponseStatusCode <Int32>]
[-CustomBlockResponseBody <String>]
[-RequestBodyCheck <String>]
[-LogScrubbingSetting <PSFrontDoorWafLogScrubbingSetting>]
[-JavascriptChallengeExpirationInMinutes <Int32>]
[-CaptchaExpirationInMinutes <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByObjectParameterSet
Update-AzFrontDoorWafPolicy
-InputObject <PSPolicy>
[-EnabledState <PSEnabledState>]
[-Mode <String>]
[-Customrule <PSCustomRule[]>]
[-ManagedRule <PSManagedRule[]>]
[-RedirectUrl <String>]
[-CustomBlockResponseStatusCode <Int32>]
[-CustomBlockResponseBody <String>]
[-RequestBodyCheck <String>]
[-LogScrubbingSetting <PSFrontDoorWafLogScrubbingSetting>]
[-JavascriptChallengeExpirationInMinutes <Int32>]
[-CaptchaExpirationInMinutes <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByResourceIdParameterSet
Update-AzFrontDoorWafPolicy
-ResourceId <String>
[-EnabledState <PSEnabledState>]
[-Mode <String>]
[-Customrule <PSCustomRule[]>]
[-ManagedRule <PSManagedRule[]>]
[-RedirectUrl <String>]
[-CustomBlockResponseStatusCode <Int32>]
[-CustomBlockResponseBody <String>]
[-RequestBodyCheck <String>]
[-LogScrubbingSetting <PSFrontDoorWafLogScrubbingSetting>]
[-JavascriptChallengeExpirationInMinutes <Int32>]
[-CaptchaExpirationInMinutes <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-AzFrontDoorWafPolicy cmdlet updates an existing WAF policy. If input parameters are not provided, old parameters from the existing WAF policy will be used.
Examples
Example 1
Update-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName -CustomBlockResponseStatusCode 403
Name PolicyMode PolicyEnabledState CustomBlockResponseStatusCode RedirectUrl
---- ---------- ------------------ ----------------------------- -----------
{policyName} Prevention Enabled 403 https://www.bing.com/
Update an existing WAF policy custom status code.
Example 2
Update-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName -Mode Detection
Name PolicyMode PolicyEnabledState CustomBlockResponseStatusCode RedirectUrl
---- ---------- ------------------ ----------------------------- -----------
{policyName} Detection Enabled 403 https://www.bing.com/
Update an existing WAF policy mode.
Example 3
Update-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName -Mode Detection -EnabledState Disabled
Name PolicyMode PolicyEnabledState CustomBlockResponseStatusCode RedirectUrl
---- ---------- ------------------ ----------------------------- -----------
{policyName} Detection Disabled 403 https://www.bing.com/
Update an existing WAF policy enabled state and mode.
Example 4
Get-AzFrontDoorWafPolicy -ResourceGroupName $resourceGroupName | Update-AzFrontDoorWafPolicy -Mode Detection -EnabledState Disabled
Update all WAF policies in $resourceGroupName
Parameters
-CaptchaExpirationInMinutes
setting is only applicable to Premium_AzureFrontDoor. Value must be an integer between 5 and 1440
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CustomBlockResponseBody
Custom Response Body
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CustomBlockResponseStatusCode
Custom Response Status Code
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Customrule
Custom rules inside the policy
Parameter properties
Type: PSCustomRule [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnabledState
Whether the policy is in enabled state or disabled state.
Possible values include: 'Disabled', 'Enabled'
Parameter properties
Type: PSEnabledState
Default value: None
Accepted values: Enabled, Disabled
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The FireWallPolicy object to update.
Type: PSPolicy
Default value: None
Supports wildcards: False
DontShow: False
ByObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-JavascriptChallengeExpirationInMinutes
setting is only applicable to Premium_AzureFrontDoor. Value must be an integer between 5 and 1440 with the default value being 30.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LogScrubbingSetting
Defines rules that scrub sensitive fields in the Web Application Firewall.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ManagedRule
Managed rules inside the policy
Parameter properties
Type: PSManagedRule [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Mode
Describes if it is in detection mode or prevention mode at policy level.
Possible values include:'Prevention', 'Detection'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the FireWallPolicy to update.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RedirectUrl
Redirect URL
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RequestBodyCheck
Defines if the body should be inspected by managed rules. Possible values include: 'Enabled', 'Disabled'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group to which the FireWallPolicy belongs.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByFieldsParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
Resource Id of the FireWallPolicy to update
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByResourceIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
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 .
Outputs