New-AzFirewallPolicyApplicationRuleCustomHttpHeader

Skapa en ny Azure Firewall Policy Application Rule Custon HTTP-huvud

Syntax

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

Description

Cmdleten New-AzFirewallPolicyApplicationRuleCustomHttpHeader skapar ett anpassat HTTP-huvud för programregeln.

Exempel

Exempel 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)

Det här exemplet skapar en programregel och ett anpassat HTTP-huvud och lägger sedan till huvudet i regeln.

Parametrar

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

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

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HeaderName

Beskrivningen av regeln

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

-HeaderValue

Beskrivningen av regeln

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

-WhatIf

Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.

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

Indata

None

Utdata

PSAzureFirewallPolicyApplicationRuleCustomHttpHeader