Microsoft.Network FrontDoorWebApplicationFirewallPolicies 2018-08-01
Bicep 資源定義
FrontDoorWebApplicationFirewallPolicies 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.Network/FrontDoorWebApplicationFirewallPolicies 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.Network/FrontDoorWebApplicationFirewallPolicies@2018-08-01' = {
etag: 'string'
location: 'string'
name: 'string'
properties: {
customRules: {
rules: [
{
action: 'string'
matchConditions: [
{
matchValue: [
'string'
]
matchVariable: 'string'
negateCondition: bool
operator: 'string'
selector: 'string'
}
]
name: 'string'
priority: int
rateLimitDurationInMinutes: int
rateLimitThreshold: int
ruleType: 'string'
transforms: [
'string'
]
}
]
}
managedRules: {
ruleSets: [
{
priority: int
version: int
ruleSetType: 'string'
// For remaining properties, see ManagedRuleSet objects
}
]
}
policySettings: {
enabledState: 'string'
mode: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
ManagedRuleSet 物件
設定 ruleSetType 屬性 屬性,以指定物件的類型。
針對 AzureManagedRuleSet,請使用:
{
ruleGroupOverrides: [
{
action: 'string'
ruleGroupOverride: 'string'
}
]
ruleSetType: 'AzureManagedRuleSet'
}
屬性值
AzureManagedOverrideRuleGroup
名字 | 描述 | 價值 |
---|---|---|
行動 | 動作類型 | 'Allow' 'Block' 'Log' (必要) |
ruleGroupOverride | 描述覆寫規則群組 | 'SqlInjection' 'XSS' (必要) |
AzureManagedRuleSet
名字 | 描述 | 價值 |
---|---|---|
ruleGroupOverrides | Azure 受控提供者覆寫組態列表 (選擇性) | AzureManagedOverrideRuleGroup[] |
ruleSetType | RuleSetType - AzureManagedRuleSet 或 OWASP RuleSets。 | 'AzureManagedRuleSet' (必要) |
CustomRule
名字 | 描述 | 價值 |
---|---|---|
行動 | 動作類型 | 'Allow' 'Block' 'Log' (必要) |
matchConditions | 比對條件清單 | MatchConditionAutoGenerated[] (必要) |
名字 | 取得原則內唯一的資源名稱。 此名稱可用來存取資源。 | 字串 約束: 最大長度 = 128 |
優先權 | 描述規則的優先順序。 在具有較高值的規則之前,會先評估具有較低值的規則 | int (必要) |
rateLimitDurationInMinutes | 定義速率限制持續時間。 預設值 - 1 分鐘 | int |
rateLimitThreshold | 定義速率限制閾值 | int |
ruleType | 描述規則的類型 | 'MatchRule' 'RateLimitRule' (必要) |
變換 | 轉換清單 | 包含任何的字串數組: 'HtmlEntityDecode' '小寫' 'RemoveNulls' 'Trim' '大寫' 'UrlDecode' 'UrlEncode' |
CustomRules
名字 | 描述 | 價值 |
---|---|---|
規則 | 規則清單 | CustomRule[] |
ManagedRuleSet
名字 | 描述 | 價值 |
---|---|---|
優先權 | 描述規則的優先順序 | int |
ruleSetType | 針對類型 AzureManagedRuleSet,設定為 『AzureManagedRuleSet』。 | 'AzureManagedRuleSet' (必要) |
版本 | 定義規則集的版本 | int |
ManagedRuleSets
名字 | 描述 | 價值 |
---|---|---|
ruleSets | 規則清單 | ManagedRuleSet[] |
MatchConditionAutoGenerated
名字 | 描述 | 價值 |
---|---|---|
matchValue | 比對值 | string[] (必要) |
matchVariable | 比對變數 | 'PostArgs' 'QueryString' 'RemoteAddr' 'RequestBody' 'RequestHeader' 'RequestMethod' 'RequestUri' (必要) |
negateCondition | 描述這是否為否定條件 | bool |
算子 | 描述要比對的運算符 | 'Any' 'BeginsWith' 'Contains' 'EndsWith' 'Equal' 'GeoMatch' 'GreaterThan' 'GreaterThanOrEqual' 'IPMatch' 'LessThan' 'LessThanOrEqual' (必要) |
選擇器 | RequestHeader 或 RequestBody 中要比對的選取器名稱 | 字串 |
Microsoft.Network/FrontDoorWebApplicationFirewallPolicies
名字 | 描述 | 價值 |
---|---|---|
etag | 取得唯一的唯一 | 字串 |
位置 | 資源位置。 | 字串 |
名字 | 資源名稱 | 字串 約束: 最大長度 = 128 (必要) |
性能 | Web 應用程式防火牆原則的屬性。 | WebApplicationFirewallPolicyPropertiesFormat |
標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
PolicySettings
名字 | 描述 | 價值 |
---|---|---|
enabledState | 描述原則是否處於啟用狀態或停用狀態 | 'Disabled' 'Enabled' |
模式 | 描述它是否處於原則層級的偵測模式或預防模式 | 'Detection' '預防' |
ResourceTags
名字 | 描述 | 價值 |
---|
WebApplicationFirewallPolicyPropertiesFormat
名字 | 描述 | 價值 |
---|---|---|
customRules | 描述原則內的自定義規則 | CustomRules |
managedRules | 描述原則內的Managed規則 | ManagedRuleSets |
policySettings | 描述原則的原則設定 | PolicySettings |
快速入門範例
下列快速入門範例會部署此資源類型。
Bicep 檔案 | 描述 |
---|---|
設定適用於 Azure Front Door 的 WAF 受控 defaultRuleSet | 此範本會設定適用於 Azure Front Door 的 WAF 受控 defaultRuleSet |
使用 Blob 來源和 Private Link |
此範本會建立 Front Door Premium 和 Azure 記憶體 Blob 容器,並使用 Front Door 的私人端點將流量傳送至記憶體帳戶。 |
使用 WAF 和受Microsoft管理的規則集 Front Door Premium | 此範本會建立 Front Door Premium,包括具有受Microsoft管理的預設和 Bot 保護規則集的 Web 應用程式防火牆。 |
使用異地篩選 |
此範本會建立 Front Door Standard/Premium,包括具有地理篩選規則的 Web 應用程式防火牆。 |
具有速率限制的 front Door Standard/Premium | 此範本會建立 Front Door Standard/Premium,包括具有速率限制規則的 Web 應用程式防火牆。 |
使用 WAF 和自定義規則 Front Door Standard/Premium | 此範本會建立 Front Door Standard/Premium,包括具有自定義規則的 Web 應用程式防火牆。 |
具有 Blob 上傳 blob 來源的 Front Door |
此範本會建立具有來源、路由和 ruleSet 的 Front Door,以及具有 Blob 容器的 Azure 記憶體帳戶。 Front Door 會在上傳檔案時將流量傳送至記憶體帳戶。 |
使用 WAF、網域和記錄將 FrontDoor CDN 至 EventHub | 此範本會建立新的 Azure FrontDoor cdn 配置檔。 使用自定義和受控規則、cdn 路由、來源和群組建立 WAF 與 WAF 和路由的關聯、設定自定義網路變數、建立事件中樞和診斷設定,以使用事件中樞傳送 CDN 存取記錄。 |
由 Azure Frontdoor 保護的 |
此範本可讓您部署受 Azure Frontdoor Premium 保護及發佈的 Azure 進階函式。 Azure Frontdoor 與 Azure Functions 之間的 Conenction 受到 Azure Private Link 的保護。 |
ARM 樣本資源定義
FrontDoorWebApplicationFirewallPolicies 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.Network/FrontDoorWebApplicationFirewallPolicies 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.Network/FrontDoorWebApplicationFirewallPolicies",
"apiVersion": "2018-08-01",
"name": "string",
"etag": "string",
"location": "string",
"properties": {
"customRules": {
"rules": [
{
"action": "string",
"matchConditions": [
{
"matchValue": [ "string" ],
"matchVariable": "string",
"negateCondition": "bool",
"operator": "string",
"selector": "string"
}
],
"name": "string",
"priority": "int",
"rateLimitDurationInMinutes": "int",
"rateLimitThreshold": "int",
"ruleType": "string",
"transforms": [ "string" ]
}
]
},
"managedRules": {
"ruleSets": [ {
"priority": "int",
"version": "int",
"ruleSetType": "string"
// For remaining properties, see ManagedRuleSet objects
} ]
},
"policySettings": {
"enabledState": "string",
"mode": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
ManagedRuleSet 物件
設定 ruleSetType 屬性 屬性,以指定物件的類型。
針對 AzureManagedRuleSet,請使用:
{
"ruleGroupOverrides": [
{
"action": "string",
"ruleGroupOverride": "string"
}
],
"ruleSetType": "AzureManagedRuleSet"
}
屬性值
AzureManagedOverrideRuleGroup
名字 | 描述 | 價值 |
---|---|---|
行動 | 動作類型 | 'Allow' 'Block' 'Log' (必要) |
ruleGroupOverride | 描述覆寫規則群組 | 'SqlInjection' 'XSS' (必要) |
AzureManagedRuleSet
名字 | 描述 | 價值 |
---|---|---|
ruleGroupOverrides | Azure 受控提供者覆寫組態列表 (選擇性) | AzureManagedOverrideRuleGroup[] |
ruleSetType | RuleSetType - AzureManagedRuleSet 或 OWASP RuleSets。 | 'AzureManagedRuleSet' (必要) |
CustomRule
名字 | 描述 | 價值 |
---|---|---|
行動 | 動作類型 | 'Allow' 'Block' 'Log' (必要) |
matchConditions | 比對條件清單 | MatchConditionAutoGenerated[] (必要) |
名字 | 取得原則內唯一的資源名稱。 此名稱可用來存取資源。 | 字串 約束: 最大長度 = 128 |
優先權 | 描述規則的優先順序。 在具有較高值的規則之前,會先評估具有較低值的規則 | int (必要) |
rateLimitDurationInMinutes | 定義速率限制持續時間。 預設值 - 1 分鐘 | int |
rateLimitThreshold | 定義速率限制閾值 | int |
ruleType | 描述規則的類型 | 'MatchRule' 'RateLimitRule' (必要) |
變換 | 轉換清單 | 包含任何的字串數組: 'HtmlEntityDecode' '小寫' 'RemoveNulls' 'Trim' '大寫' 'UrlDecode' 'UrlEncode' |
CustomRules
名字 | 描述 | 價值 |
---|---|---|
規則 | 規則清單 | CustomRule[] |
ManagedRuleSet
名字 | 描述 | 價值 |
---|---|---|
優先權 | 描述規則的優先順序 | int |
ruleSetType | 針對類型 AzureManagedRuleSet,設定為 『AzureManagedRuleSet』。 | 'AzureManagedRuleSet' (必要) |
版本 | 定義規則集的版本 | int |
ManagedRuleSets
名字 | 描述 | 價值 |
---|---|---|
ruleSets | 規則清單 | ManagedRuleSet[] |
MatchConditionAutoGenerated
名字 | 描述 | 價值 |
---|---|---|
matchValue | 比對值 | string[] (必要) |
matchVariable | 比對變數 | 'PostArgs' 'QueryString' 'RemoteAddr' 'RequestBody' 'RequestHeader' 'RequestMethod' 'RequestUri' (必要) |
negateCondition | 描述這是否為否定條件 | bool |
算子 | 描述要比對的運算符 | 'Any' 'BeginsWith' 'Contains' 'EndsWith' 'Equal' 'GeoMatch' 'GreaterThan' 'GreaterThanOrEqual' 'IPMatch' 'LessThan' 'LessThanOrEqual' (必要) |
選擇器 | RequestHeader 或 RequestBody 中要比對的選取器名稱 | 字串 |
Microsoft.Network/FrontDoorWebApplicationFirewallPolicies
名字 | 描述 | 價值 |
---|---|---|
apiVersion | API 版本 | '2018-08-01' |
etag | 取得唯一的唯一 | 字串 |
位置 | 資源位置。 | 字串 |
名字 | 資源名稱 | 字串 約束: 最大長度 = 128 (必要) |
性能 | Web 應用程式防火牆原則的屬性。 | WebApplicationFirewallPolicyPropertiesFormat |
標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
類型 | 資源類型 | 'Microsoft.Network/FrontDoorWebApplicationFirewallPolicies' |
PolicySettings
名字 | 描述 | 價值 |
---|---|---|
enabledState | 描述原則是否處於啟用狀態或停用狀態 | 'Disabled' 'Enabled' |
模式 | 描述它是否處於原則層級的偵測模式或預防模式 | 'Detection' '預防' |
ResourceTags
名字 | 描述 | 價值 |
---|
WebApplicationFirewallPolicyPropertiesFormat
名字 | 描述 | 價值 |
---|---|---|
customRules | 描述原則內的自定義規則 | CustomRules |
managedRules | 描述原則內的Managed規則 | ManagedRuleSets |
policySettings | 描述原則的原則設定 | PolicySettings |
快速入門範本
下列快速入門範本會部署此資源類型。
範本 | 描述 |
---|---|
為 Azure Front Door 設定 WAF 用戶端 IP 限制 |
此範本會設定 Azure Front Door 端點的 WAF 用戶端 IP 限制 |
設定適用於 Azure Front Door 的 WAF 受控 defaultRuleSet |
此範本會設定適用於 Azure Front Door 的 WAF 受控 defaultRuleSet |
設定 Azure Front Door 端點的 WAF 速率限制規則 |
此範本會設定 Azure Front Door 的 WAF 規則,以針對指定的前端主機對傳入流量進行速率限制。 |
使用 Front Door 的 http 參數設定 WAF 規則 |
此範本會根據 Azure Front Door 端點的特定 HTTP 參數來設定 WAF 自定義規則。 |
在 Azure API 管理 前建立 Azure Front Door |
此範例示範如何在 Azure API 管理前使用 Azure Front Door 作為全域負載平衡器。 |
為 Azure Front Door 端點建立 WAF 地理篩選規則 |
此範本會為 Azure Front Door 建立 WAF 地理篩選規則,以允許/封鎖來自特定國家/地區的流量。 |
使用 Blob 來源和 Private Link |
此範本會建立 Front Door Premium 和 Azure 記憶體 Blob 容器,並使用 Front Door 的私人端點將流量傳送至記憶體帳戶。 |
使用 WAF 和受Microsoft管理的規則集 Front Door Premium |
此範本會建立 Front Door Premium,包括具有受Microsoft管理的預設和 Bot 保護規則集的 Web 應用程式防火牆。 |
使用異地篩選 |
此範本會建立 Front Door Standard/Premium,包括具有地理篩選規則的 Web 應用程式防火牆。 |
具有速率限制的 front Door Standard/Premium |
此範本會建立 Front Door Standard/Premium,包括具有速率限制規則的 Web 應用程式防火牆。 |
使用 WAF 和自定義規則 Front Door Standard/Premium |
此範本會建立 Front Door Standard/Premium,包括具有自定義規則的 Web 應用程式防火牆。 |
具有 Blob 上傳 blob 來源的 Front Door |
此範本會建立具有來源、路由和 ruleSet 的 Front Door,以及具有 Blob 容器的 Azure 記憶體帳戶。 Front Door 會在上傳檔案時將流量傳送至記憶體帳戶。 |
使用 WAF、網域和記錄將 FrontDoor CDN 至 EventHub |
此範本會建立新的 Azure FrontDoor cdn 配置檔。 使用自定義和受控規則、cdn 路由、來源和群組建立 WAF 與 WAF 和路由的關聯、設定自定義網路變數、建立事件中樞和診斷設定,以使用事件中樞傳送 CDN 存取記錄。 |
由 Azure Frontdoor 保護的 |
此範本可讓您部署受 Azure Frontdoor Premium 保護及發佈的 Azure 進階函式。 Azure Frontdoor 與 Azure Functions 之間的 Conenction 受到 Azure Private Link 的保護。 |
Terraform (AzAPI 提供者) 資源定義
FrontDoorWebApplicationFirewallPolicies 資源類型可以使用目標作業來部署:
- 資源群組
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.Network/FrontDoorWebApplicationFirewallPolicies 資源,請將下列 Terraform 新增至您的範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/FrontDoorWebApplicationFirewallPolicies@2018-08-01"
name = "string"
etag = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
customRules = {
rules = [
{
action = "string"
matchConditions = [
{
matchValue = [
"string"
]
matchVariable = "string"
negateCondition = bool
operator = "string"
selector = "string"
}
]
name = "string"
priority = int
rateLimitDurationInMinutes = int
rateLimitThreshold = int
ruleType = "string"
transforms = [
"string"
]
}
]
}
managedRules = {
ruleSets = [
{
priority = int
version = int
ruleSetType = "string"
// For remaining properties, see ManagedRuleSet objects
}
]
}
policySettings = {
enabledState = "string"
mode = "string"
}
}
})
}
ManagedRuleSet 物件
設定 ruleSetType 屬性 屬性,以指定物件的類型。
針對 AzureManagedRuleSet,請使用:
{
ruleGroupOverrides = [
{
action = "string"
ruleGroupOverride = "string"
}
]
ruleSetType = "AzureManagedRuleSet"
}
屬性值
AzureManagedOverrideRuleGroup
名字 | 描述 | 價值 |
---|---|---|
行動 | 動作類型 | 'Allow' 'Block' 'Log' (必要) |
ruleGroupOverride | 描述覆寫規則群組 | 'SqlInjection' 'XSS' (必要) |
AzureManagedRuleSet
名字 | 描述 | 價值 |
---|---|---|
ruleGroupOverrides | Azure 受控提供者覆寫組態列表 (選擇性) | AzureManagedOverrideRuleGroup[] |
ruleSetType | RuleSetType - AzureManagedRuleSet 或 OWASP RuleSets。 | 'AzureManagedRuleSet' (必要) |
CustomRule
名字 | 描述 | 價值 |
---|---|---|
行動 | 動作類型 | 'Allow' 'Block' 'Log' (必要) |
matchConditions | 比對條件清單 | MatchConditionAutoGenerated[] (必要) |
名字 | 取得原則內唯一的資源名稱。 此名稱可用來存取資源。 | 字串 約束: 最大長度 = 128 |
優先權 | 描述規則的優先順序。 在具有較高值的規則之前,會先評估具有較低值的規則 | int (必要) |
rateLimitDurationInMinutes | 定義速率限制持續時間。 預設值 - 1 分鐘 | int |
rateLimitThreshold | 定義速率限制閾值 | int |
ruleType | 描述規則的類型 | 'MatchRule' 'RateLimitRule' (必要) |
變換 | 轉換清單 | 包含任何的字串數組: 'HtmlEntityDecode' '小寫' 'RemoveNulls' 'Trim' '大寫' 'UrlDecode' 'UrlEncode' |
CustomRules
名字 | 描述 | 價值 |
---|---|---|
規則 | 規則清單 | CustomRule[] |
ManagedRuleSet
名字 | 描述 | 價值 |
---|---|---|
優先權 | 描述規則的優先順序 | int |
ruleSetType | 針對類型 AzureManagedRuleSet,設定為 『AzureManagedRuleSet』。 | 'AzureManagedRuleSet' (必要) |
版本 | 定義規則集的版本 | int |
ManagedRuleSets
名字 | 描述 | 價值 |
---|---|---|
ruleSets | 規則清單 | ManagedRuleSet[] |
MatchConditionAutoGenerated
名字 | 描述 | 價值 |
---|---|---|
matchValue | 比對值 | string[] (必要) |
matchVariable | 比對變數 | 'PostArgs' 'QueryString' 'RemoteAddr' 'RequestBody' 'RequestHeader' 'RequestMethod' 'RequestUri' (必要) |
negateCondition | 描述這是否為否定條件 | bool |
算子 | 描述要比對的運算符 | 'Any' 'BeginsWith' 'Contains' 'EndsWith' 'Equal' 'GeoMatch' 'GreaterThan' 'GreaterThanOrEqual' 'IPMatch' 'LessThan' 'LessThanOrEqual' (必要) |
選擇器 | RequestHeader 或 RequestBody 中要比對的選取器名稱 | 字串 |
Microsoft.Network/FrontDoorWebApplicationFirewallPolicies
名字 | 描述 | 價值 |
---|---|---|
etag | 取得唯一的唯一 | 字串 |
位置 | 資源位置。 | 字串 |
名字 | 資源名稱 | 字串 約束: 最大長度 = 128 (必要) |
性能 | Web 應用程式防火牆原則的屬性。 | WebApplicationFirewallPolicyPropertiesFormat |
標籤 | 資源標籤 | 標記名稱和值的字典。 |
類型 | 資源類型 | “Microsoft.Network/FrontDoorWebApplicationFirewallPolicies@2018-08-01” |
PolicySettings
名字 | 描述 | 價值 |
---|---|---|
enabledState | 描述原則是否處於啟用狀態或停用狀態 | 'Disabled' 'Enabled' |
模式 | 描述它是否處於原則層級的偵測模式或預防模式 | 'Detection' '預防' |
ResourceTags
名字 | 描述 | 價值 |
---|
WebApplicationFirewallPolicyPropertiesFormat
名字 | 描述 | 價值 |
---|---|---|
customRules | 描述原則內的自定義規則 | CustomRules |
managedRules | 描述原則內的Managed規則 | ManagedRuleSets |
policySettings | 描述原則的原則設定 | PolicySettings |