New-AzApplicationGatewayFirewallPolicy

Creates a application gateway firewall policy.

Syntax

New-AzApplicationGatewayFirewallPolicy
   -Name <String>
   -ResourceGroupName <String>
   -Location <String>
   [-CustomRule <PSApplicationGatewayFirewallCustomRule[]>]
   [-PolicySetting <PSApplicationGatewayFirewallPolicySettings>]
   [-ManagedRule <PSApplicationGatewayFirewallPolicyManagedRules>]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzApplicationGatewayFirewallPolicy cmdlet creates a application gateway firewall policy.

Examples

Example 1

PS C:\> $firewallPolicy = New-AzApplicationGatewayFirewallPolicy -Name wafResource1 -ResourceGroupName "rg1"  -Location  "westus" -CustomRules $customRule

This command creates a new Azure application gateway firewall policy named "wafResource1" in resource group "rg1" in location "westus" with custom rules defined in the $customRule variable

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CustomRule

The list of CustomRules

Type:Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCustomRule[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Do not ask for confirmation if you want to overwrite a resource

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Location

location.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ManagedRule

Managed Rule Setting

Type:Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallPolicyManagedRules
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

The resource name.

Type:String
Aliases:ResourceName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PolicySetting

Policy Settings for Web Application Firewall

Type:Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallPolicySettings
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

The resource group name.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Tag

A hashtable which represents resource tags.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCustomRule[]

Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallPolicySettings

Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallPolicyManagedRules

Hashtable

Outputs

Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallPolicy