你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzFirewallPolicy
保存修改后的 Azure 防火墙策略
语法
Set-AzFirewallPolicy
-Name <String>
-ResourceGroupName <String>
[-AsJob]
[-ThreatIntelMode <String>]
[-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
[-BasePolicy <String>]
[-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
[-SqlSetting <PSAzureFirewallPolicySqlSetting>]
-Location <String>
[-Tag <Hashtable>]
[-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
[-TransportSecurityName <String>]
[-TransportSecurityKeyVaultSecretId <String>]
[-SkuTier <String>]
[-UserAssignedIdentityId <String>]
[-Identity <PSManagedServiceIdentity>]
[-PrivateRange <String[]>]
[-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
[-Snat <PSAzureFirewallPolicySNAT>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzFirewallPolicy
[-Name <String>]
-InputObject <PSAzureFirewallPolicy>
[-AsJob]
[-ThreatIntelMode <String>]
[-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
[-BasePolicy <String>]
[-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
[-SqlSetting <PSAzureFirewallPolicySqlSetting>]
[-Location <String>]
[-Tag <Hashtable>]
[-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
[-TransportSecurityName <String>]
[-TransportSecurityKeyVaultSecretId <String>]
[-SkuTier <String>]
[-UserAssignedIdentityId <String>]
[-Identity <PSManagedServiceIdentity>]
[-PrivateRange <String[]>]
[-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
[-Snat <PSAzureFirewallPolicySNAT>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzFirewallPolicy
[-AsJob]
-ResourceId <String>
[-ThreatIntelMode <String>]
[-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
[-BasePolicy <String>]
[-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
[-SqlSetting <PSAzureFirewallPolicySqlSetting>]
-Location <String>
[-Tag <Hashtable>]
[-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
[-TransportSecurityName <String>]
[-TransportSecurityKeyVaultSecretId <String>]
[-SkuTier <String>]
[-UserAssignedIdentityId <String>]
[-Identity <PSManagedServiceIdentity>]
[-PrivateRange <String[]>]
[-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
[-Snat <PSAzureFirewallPolicySNAT>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Set-AzFirewallPolicy cmdlet 更新Azure 防火墙策略。
示例
示例 1
Set-AzFirewallPolicy -InputObject $fp
此示例使用新的防火墙策略值设置防火墙策略
示例 2
Set-AzFirewallPolicy -Name firewallPolicy1 -ResourceGroupName TestRg -Location westcentralus -ThreatIntelMode "Alert"
此示例使用新的威胁 Intel 模式设置防火墙策略
示例 3
$threatIntelWhitelist = New-AzFirewallPolicyThreatIntelWhitelist -IpAddress 23.46.72.91,192.79.236.79 -FQDN microsoft.com
Set-AzFirewallPolicy -Name firewallPolicy1 -ResourceGroupName TestRg -Location westcentralus -ThreatIntelWhitelist $threatIntelWhitelist
此示例使用新的威胁 Intel 允许列表设置防火墙策略
示例 4
$exProxy = New-AzFirewallPolicyExplicitProxy -EnableExplicitProxy -HttpPort 100 -HttpsPort 101 -EnablePacFile -PacFilePort 130 -PacFile "sampleurlfortesting.blob.core.windowsnet/nothing"
Set-AzFirewallPolicy -Name firewallPolicy1 -ResourceGroupName TestRg -Location westcentralus -ExplicitProxy $exProxy
BasePolicy : null
DnsSettings : null
Etag : null
ExplicitProxy
EnableExplicitProxy : true
EnablePacFile : true
HttpPort : 100
HttpsPort : 101
PacFile : "sampleurlfortesting.blob.core.windowsnet/nothing"
PacFilePort : 130
Id : null
Identity : null
IntrusionDetection : null
Location : "westcentralus"
Name : "firewallPolicy1"
PrivateRange : null
PrivateRangeText : "[]"
ProvisioningState : null
ResourceGroupName : "TestRg"
ResourceGuid : null
RuleCollectionGroups : null
Sku
Tier : "Standard"
Snat
AutoLearnPrivateRanges : null
PrivateRanges : null
SqlSetting : null
Tag : null
TagsTable : null
ThreatIntelMode : "Alert"
ThreatIntelWhitelist : null
TransportSecurity : null
Type : null
此示例使用显式代理设置设置设置防火墙策略
参数
-AsJob
在后台运行 cmdlet
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-BasePolicy
要从中继承的基本策略
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Confirm
提示你在运行 cmdlet 之前进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DnsSetting
DNS 设置
类型: | PSAzureFirewallPolicyDnsSettings |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ExplicitProxy
显式代理设置
类型: | PSAzureFirewallPolicyExplicitProxy |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Identity
要分配给防火墙策略的防火墙策略标识。
类型: | PSManagedServiceIdentity |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
AzureFirewall 策略
类型: | PSAzureFirewallPolicy |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-IntrusionDetection
入侵检测设置
类型: | PSAzureFirewallPolicyIntrusionDetection |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Location
数据库。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Name
资源名称。
类型: | String |
别名: | ResourceName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | True |
-PrivateRange
专用 IP 范围
类型: | String[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
资源组名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | True |
-ResourceId
资源 ID。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | True |
-SkuTier
防火墙策略 SKU 层
类型: | String |
接受的值: | Standard, Premium, Basic |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Snat
流量不会在防火墙策略中为 SNAT 的专用 IP 地址/IP 范围。
类型: | PSAzureFirewallPolicySNAT |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-SqlSetting
与 SQL 相关的设置
类型: | PSAzureFirewallPolicySqlSetting |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Tag
表示资源标记的哈希表。
类型: | Hashtable |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-ThreatIntelMode
威胁智能的操作模式。
类型: | String |
接受的值: | Alert, Deny, Off |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-ThreatIntelWhitelist
威胁情报的允许列表
类型: | PSAzureFirewallPolicyThreatIntelWhitelist |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-TransportSecurityKeyVaultSecretId
KeyVault 中存储的“Secret”或“Certificate”对象的机密 ID(base-64 编码的未加密 pfx)
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-TransportSecurityName
传输安全名称
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-UserAssignedIdentityId
要分配给防火墙策略的用户分配标识的 ResourceId。
类型: | String |
别名: | UserAssignedIdentity |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |