編集

次の方法で共有


New-AzFirewallPolicyApplicationRuleCustomHttpHeader

Create a new Azure Firewall Policy Application Rule Custon HTTP Header

Syntax

New-AzFirewallPolicyApplicationRuleCustomHttpHeader
   -HeaderName <String>
   -HeaderValue <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzFirewallPolicyApplicationRuleCustomHttpHeader cmdlet creates a Custom HTTP Header for Application Rule.

Examples

Example 1

$appRule = New-AzFirewallPolicyApplicationRule -Name "appRule" -SourceAddress "192.168.0.0/16" -TargetFqdn "*.contoso.com" -Protocol "https:443"

$headerToInsert = New-AzFirewallPolicyApplicationRuleCustomHttpHeader -HeaderName "Restrict-Access-To-Tenants" -HeaderValue "contoso.com,fabrikam.onmicrosoft.com"

$appRule.AddCustomHttpHeaderToInsert($headerToInsert)

This example creates an application rule and a custom HTTP header, then adds the header to the rule.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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

-HeaderName

The description of the rule

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-HeaderValue

The description of the rule

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSAzureFirewallPolicyApplicationRuleCustomHttpHeader