Bicep 資源定義
firewallPolicies/ruleGroups 資源類型可以使用目標作業來部署:
- 資源群組 - 請參見 資源群組部署指令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
創造一個 Microsoft。Network/firewallPolicies/ruleGroups 資源,請將以下 Bicep 加入你的範本。
resource symbolicname 'Microsoft.Network/firewallPolicies/ruleGroups@2019-11-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
priority: int
rules: [
{
name: 'string'
priority: int
ruleType: 'string'
// For remaining properties, see FirewallPolicyRule objects
}
]
}
}
FirewallPolicyRule 物件
設定 ruleType 屬性,以指定物件的類型。
針對 FirewallPolicyFilterRule,請使用:
{
action: {
type: 'string'
}
ruleConditions: [
{
description: 'string'
name: 'string'
ruleConditionType: 'string'
// For remaining properties, see FirewallPolicyRuleCondition objects
}
]
ruleType: 'FirewallPolicyFilterRule'
}
針對 FirewallPolicyNatRule,請使用:
{
action: {
type: 'string'
}
ruleCondition: {
description: 'string'
name: 'string'
ruleConditionType: 'string'
// For remaining properties, see FirewallPolicyRuleCondition objects
}
ruleType: 'FirewallPolicyNatRule'
translatedAddress: 'string'
translatedPort: 'string'
}
FirewallPolicyRuleCondition 物件
設定 ruleConditionType ruleConditionType 属性,以指定對象的類型。
針對 applicationRuleCondition
{
destinationAddresses: [
'string'
]
fqdnTags: [
'string'
]
protocols: [
{
port: int
protocolType: 'string'
}
]
ruleConditionType: 'ApplicationRuleCondition'
sourceAddresses: [
'string'
]
targetFqdns: [
'string'
]
}
針對 NetworkRuleCondition,請使用:
{
destinationAddresses: [
'string'
]
destinationPorts: [
'string'
]
ipProtocols: [
'string'
]
ruleConditionType: 'NetworkRuleCondition'
sourceAddresses: [
'string'
]
}
屬性值
Microsoft。Network/firewallPolicies/ruleGroups
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 名稱 | 資源名稱 | 字串 (必要) |
| 父代 | 在 Bicep 中,你可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。 欲了解更多資訊,請參閱 Child 資源 外部 parent resource。 |
類型的資源符號名稱:firewallPolicies |
| 屬性 | 防火牆原則規則群組的屬性。 | FirewallPolicyRuleGroup屬性 |
ApplicationRuleCondition 應用程式規則條件
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| destinationAddresses | 目的地 IP 位址或服務標籤的清單。 | 字串[] |
| fqdn標籤 | 此規則條件的 FQDN 標籤清單。 | 字串[] |
| 協定 | 應用程式通訊協議的陣列。 | FirewallPolicyRuleConditionApplicationProtocol[] |
| ruleConditionType | 規則條件類型。 | 'ApplicationRuleCondition' (必要) |
| sourceAddresses (源位址) | 此規則的來源IP位址清單。 | 字串[] |
| targetFqdns | 此規則條件的 FQDN 清單。 | 字串[] |
FirewallPolicyFilterRule
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 動作 | 篩選規則的動作類型。 | FirewallPolicyFilterRuleAction |
| ruleConditions 規則條件 | 規則所使用的規則條件集合。 | FirewallPolicyRuleCondition[] |
| ruleType | 規則的類型。 | 'FirewallPolicyFilterRule' (必要) |
FirewallPolicyFilterRuleAction
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 型別 | 動作的類型。 | '允許' “否認” |
防火牆策略NatRule
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 動作 | Nat 規則的動作類型。 | FirewallPolicyNatRuleAction |
| ruleCondition | 連入流量的比對條件。 | FirewallPolicyRuleCondition |
| ruleType | 規則的類型。 | 'FirewallPolicyNatRule' (必要) |
| 翻譯位址 | 此 NAT 規則的翻譯位址。 | 字串 |
| 翻譯埠 | 此 NAT 規則的轉譯埠。 | 字串 |
FirewallPolicyNatRuleAction
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 型別 | 動作的類型。 | “DNAT” |
防火牆策略規則
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 名稱 | 規則的名稱。 | 字串 |
| 優先權 | 防火牆原則規則資源的優先順序。 | int 約束: 最小值 = 100 最大值 = 65000 |
| ruleType | 針對類型 FirewallPolicyFilterRule,設定為 'FirewallPolicyFilterRule'。 針對 FirewallPolicyNatRule 類型設定為 'FirewallPolicyNatRule',。 | 'FirewallPolicyFilterRule' 'FirewallPolicyNatRule' (必要) |
FirewallPolicyRuleCondition
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 說明 | 規則條件的描述。 | 字串 |
| 名稱 | 規則條件的名稱。 | 字串 |
| ruleConditionType | 將 類型設定為 'ApplicationRuleCondition' ApplicationRuleCondition。 針對 networkRuleCondition 類型 設定為 'NetworkRuleCondition',。 | “ApplicationRuleCondition” 'NetworkRuleCondition' (必要) |
FirewallPolicyRuleConditionApplicationProtocol
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 傳輸埠 | 通訊協定的埠號碼不能大於 64000。 | int 約束: 最小值 = 0 最大值 = 64000 |
| protocolType 協議類型 | 通訊協定類型。 | 'Http' 'https' |
FirewallPolicyRuleGroup屬性
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 優先權 | 防火牆原則規則群組資源的優先順序。 | int 約束: 最小值 = 100 最大值 = 65000 |
| 規則 | 防火牆原則規則群組。 | FirewallPolicyRule[] |
NetworkRuleCondition
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| destinationAddresses | 目的地 IP 位址或服務標籤的清單。 | 字串[] |
| destinationPorts | 目的地埠清單。 | 字串[] |
| ip協定 | FirewallPolicyRuleConditionNetworkProtocols 的陣列。 | 包含任何的字串數組: '任何' “國際馬檢站” “TCP” “UDP 協定” |
| ruleConditionType | 規則條件類型。 | 'NetworkRuleCondition' (必要) |
| sourceAddresses (源位址) | 此規則的來源IP位址清單。 | 字串[] |
ARM 樣本資源定義
firewallPolicies/ruleGroups 資源類型可以使用目標作業來部署:
使用範例
資源格式
創造一個 Microsoft。Network/firewallPolicies/ruleGroups 資源,請將以下 JSON 加入你的範本。
{
"type": "Microsoft.Network/firewallPolicies/ruleGroups",
"apiVersion": "2019-11-01",
"name": "string",
"properties": {
"priority": "int",
"rules": [ {
"name": "string",
"priority": "int",
"ruleType": "string"
// For remaining properties, see FirewallPolicyRule objects
} ]
}
}
FirewallPolicyRule 物件
設定 ruleType 屬性,以指定物件的類型。
針對 FirewallPolicyFilterRule,請使用:
{
"action": {
"type": "string"
},
"ruleConditions": [ {
"description": "string",
"name": "string",
"ruleConditionType": "string"
// For remaining properties, see FirewallPolicyRuleCondition objects
} ],
"ruleType": "FirewallPolicyFilterRule"
}
針對 FirewallPolicyNatRule,請使用:
{
"action": {
"type": "string"
},
"ruleCondition": {
"description": "string",
"name": "string",
"ruleConditionType": "string"
// For remaining properties, see FirewallPolicyRuleCondition objects
},
"ruleType": "FirewallPolicyNatRule",
"translatedAddress": "string",
"translatedPort": "string"
}
FirewallPolicyRuleCondition 物件
設定 ruleConditionType ruleConditionType 属性,以指定對象的類型。
針對 applicationRuleCondition
{
"destinationAddresses": [ "string" ],
"fqdnTags": [ "string" ],
"protocols": [
{
"port": "int",
"protocolType": "string"
}
],
"ruleConditionType": "ApplicationRuleCondition",
"sourceAddresses": [ "string" ],
"targetFqdns": [ "string" ]
}
針對 NetworkRuleCondition,請使用:
{
"destinationAddresses": [ "string" ],
"destinationPorts": [ "string" ],
"ipProtocols": [ "string" ],
"ruleConditionType": "NetworkRuleCondition",
"sourceAddresses": [ "string" ]
}
屬性值
Microsoft。Network/firewallPolicies/ruleGroups
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| apiVersion | API 版本 | '2019-11-01' |
| 名稱 | 資源名稱 | 字串 (必要) |
| 屬性 | 防火牆原則規則群組的屬性。 | FirewallPolicyRuleGroup屬性 |
| 型別 | 資源類型 | 「Microsoft。網路/防火牆政策/規則群組 |
ApplicationRuleCondition 應用程式規則條件
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| destinationAddresses | 目的地 IP 位址或服務標籤的清單。 | 字串[] |
| fqdn標籤 | 此規則條件的 FQDN 標籤清單。 | 字串[] |
| 協定 | 應用程式通訊協議的陣列。 | FirewallPolicyRuleConditionApplicationProtocol[] |
| ruleConditionType | 規則條件類型。 | 'ApplicationRuleCondition' (必要) |
| sourceAddresses (源位址) | 此規則的來源IP位址清單。 | 字串[] |
| targetFqdns | 此規則條件的 FQDN 清單。 | 字串[] |
FirewallPolicyFilterRule
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 動作 | 篩選規則的動作類型。 | FirewallPolicyFilterRuleAction |
| ruleConditions 規則條件 | 規則所使用的規則條件集合。 | FirewallPolicyRuleCondition[] |
| ruleType | 規則的類型。 | 'FirewallPolicyFilterRule' (必要) |
FirewallPolicyFilterRuleAction
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 型別 | 動作的類型。 | '允許' “否認” |
防火牆策略NatRule
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 動作 | Nat 規則的動作類型。 | FirewallPolicyNatRuleAction |
| ruleCondition | 連入流量的比對條件。 | FirewallPolicyRuleCondition |
| ruleType | 規則的類型。 | 'FirewallPolicyNatRule' (必要) |
| 翻譯位址 | 此 NAT 規則的翻譯位址。 | 字串 |
| 翻譯埠 | 此 NAT 規則的轉譯埠。 | 字串 |
FirewallPolicyNatRuleAction
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 型別 | 動作的類型。 | “DNAT” |
防火牆策略規則
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 名稱 | 規則的名稱。 | 字串 |
| 優先權 | 防火牆原則規則資源的優先順序。 | int 約束: 最小值 = 100 最大值 = 65000 |
| ruleType | 針對類型 FirewallPolicyFilterRule,設定為 'FirewallPolicyFilterRule'。 針對 FirewallPolicyNatRule 類型設定為 'FirewallPolicyNatRule',。 | 'FirewallPolicyFilterRule' 'FirewallPolicyNatRule' (必要) |
FirewallPolicyRuleCondition
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 說明 | 規則條件的描述。 | 字串 |
| 名稱 | 規則條件的名稱。 | 字串 |
| ruleConditionType | 將 類型設定為 'ApplicationRuleCondition' ApplicationRuleCondition。 針對 networkRuleCondition 類型 設定為 'NetworkRuleCondition',。 | “ApplicationRuleCondition” 'NetworkRuleCondition' (必要) |
FirewallPolicyRuleConditionApplicationProtocol
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 傳輸埠 | 通訊協定的埠號碼不能大於 64000。 | int 約束: 最小值 = 0 最大值 = 64000 |
| protocolType 協議類型 | 通訊協定類型。 | 'Http' 'https' |
FirewallPolicyRuleGroup屬性
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 優先權 | 防火牆原則規則群組資源的優先順序。 | int 約束: 最小值 = 100 最大值 = 65000 |
| 規則 | 防火牆原則規則群組。 | FirewallPolicyRule[] |
NetworkRuleCondition
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| destinationAddresses | 目的地 IP 位址或服務標籤的清單。 | 字串[] |
| destinationPorts | 目的地埠清單。 | 字串[] |
| ip協定 | FirewallPolicyRuleConditionNetworkProtocols 的陣列。 | 包含任何的字串數組: '任何' “國際馬檢站” “TCP” “UDP 協定” |
| ruleConditionType | 規則條件類型。 | 'NetworkRuleCondition' (必要) |
| sourceAddresses (源位址) | 此規則的來源IP位址清單。 | 字串[] |
Terraform (AzAPI 提供者) 資源定義
firewallPolicies/ruleGroups 資源類型可以使用目標作業來部署:
- 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
資源格式
創造一個 Microsoft。Network/firewallPolicies/ruleGroups 資源,將以下 Terraform 加入你的範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/firewallPolicies/ruleGroups@2019-11-01"
name = "string"
parent_id = "string"
body = {
properties = {
priority = int
rules = [
{
name = "string"
priority = int
ruleType = "string"
// For remaining properties, see FirewallPolicyRule objects
}
]
}
}
}
FirewallPolicyRule 物件
設定 ruleType 屬性,以指定物件的類型。
針對 FirewallPolicyFilterRule,請使用:
{
action = {
type = "string"
}
ruleConditions = [
{
description = "string"
name = "string"
ruleConditionType = "string"
// For remaining properties, see FirewallPolicyRuleCondition objects
}
]
ruleType = "FirewallPolicyFilterRule"
}
針對 FirewallPolicyNatRule,請使用:
{
action = {
type = "string"
}
ruleCondition = {
description = "string"
name = "string"
ruleConditionType = "string"
// For remaining properties, see FirewallPolicyRuleCondition objects
}
ruleType = "FirewallPolicyNatRule"
translatedAddress = "string"
translatedPort = "string"
}
FirewallPolicyRuleCondition 物件
設定 ruleConditionType ruleConditionType 属性,以指定對象的類型。
針對 applicationRuleCondition
{
destinationAddresses = [
"string"
]
fqdnTags = [
"string"
]
protocols = [
{
port = int
protocolType = "string"
}
]
ruleConditionType = "ApplicationRuleCondition"
sourceAddresses = [
"string"
]
targetFqdns = [
"string"
]
}
針對 NetworkRuleCondition,請使用:
{
destinationAddresses = [
"string"
]
destinationPorts = [
"string"
]
ipProtocols = [
"string"
]
ruleConditionType = "NetworkRuleCondition"
sourceAddresses = [
"string"
]
}
屬性值
Microsoft。Network/firewallPolicies/ruleGroups
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 名稱 | 資源名稱 | 字串 (必要) |
| 父項識別碼 | 此資源為父系之資源的標識碼。 | 類型資源的標識碼:firewallPolicies |
| 屬性 | 防火牆原則規則群組的屬性。 | FirewallPolicyRuleGroup屬性 |
| 型別 | 資源類型 | 「Microsoft。Network/firewallPolicies/ruleGroups@2019-11-01” |
ApplicationRuleCondition 應用程式規則條件
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| destinationAddresses | 目的地 IP 位址或服務標籤的清單。 | 字串[] |
| fqdn標籤 | 此規則條件的 FQDN 標籤清單。 | 字串[] |
| 協定 | 應用程式通訊協議的陣列。 | FirewallPolicyRuleConditionApplicationProtocol[] |
| ruleConditionType | 規則條件類型。 | 'ApplicationRuleCondition' (必要) |
| sourceAddresses (源位址) | 此規則的來源IP位址清單。 | 字串[] |
| targetFqdns | 此規則條件的 FQDN 清單。 | 字串[] |
FirewallPolicyFilterRule
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 動作 | 篩選規則的動作類型。 | FirewallPolicyFilterRuleAction |
| ruleConditions 規則條件 | 規則所使用的規則條件集合。 | FirewallPolicyRuleCondition[] |
| ruleType | 規則的類型。 | 'FirewallPolicyFilterRule' (必要) |
FirewallPolicyFilterRuleAction
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 型別 | 動作的類型。 | '允許' “否認” |
防火牆策略NatRule
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 動作 | Nat 規則的動作類型。 | FirewallPolicyNatRuleAction |
| ruleCondition | 連入流量的比對條件。 | FirewallPolicyRuleCondition |
| ruleType | 規則的類型。 | 'FirewallPolicyNatRule' (必要) |
| 翻譯位址 | 此 NAT 規則的翻譯位址。 | 字串 |
| 翻譯埠 | 此 NAT 規則的轉譯埠。 | 字串 |
FirewallPolicyNatRuleAction
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 型別 | 動作的類型。 | “DNAT” |
防火牆策略規則
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 名稱 | 規則的名稱。 | 字串 |
| 優先權 | 防火牆原則規則資源的優先順序。 | int 約束: 最小值 = 100 最大值 = 65000 |
| ruleType | 針對類型 FirewallPolicyFilterRule,設定為 'FirewallPolicyFilterRule'。 針對 FirewallPolicyNatRule 類型設定為 'FirewallPolicyNatRule',。 | 'FirewallPolicyFilterRule' 'FirewallPolicyNatRule' (必要) |
FirewallPolicyRuleCondition
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 說明 | 規則條件的描述。 | 字串 |
| 名稱 | 規則條件的名稱。 | 字串 |
| ruleConditionType | 將 類型設定為 'ApplicationRuleCondition' ApplicationRuleCondition。 針對 networkRuleCondition 類型 設定為 'NetworkRuleCondition',。 | “ApplicationRuleCondition” 'NetworkRuleCondition' (必要) |
FirewallPolicyRuleConditionApplicationProtocol
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 傳輸埠 | 通訊協定的埠號碼不能大於 64000。 | int 約束: 最小值 = 0 最大值 = 64000 |
| protocolType 協議類型 | 通訊協定類型。 | 'Http' 'https' |
FirewallPolicyRuleGroup屬性
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| 優先權 | 防火牆原則規則群組資源的優先順序。 | int 約束: 最小值 = 100 最大值 = 65000 |
| 規則 | 防火牆原則規則群組。 | FirewallPolicyRule[] |
NetworkRuleCondition
| 名稱 | 說明 | 價值觀 |
|---|---|---|
| destinationAddresses | 目的地 IP 位址或服務標籤的清單。 | 字串[] |
| destinationPorts | 目的地埠清單。 | 字串[] |
| ip協定 | FirewallPolicyRuleConditionNetworkProtocols 的陣列。 | 包含任何的字串數組: '任何' “國際馬檢站” “TCP” “UDP 協定” |
| ruleConditionType | 規則條件類型。 | 'NetworkRuleCondition' (必要) |
| sourceAddresses (源位址) | 此規則的來源IP位址清單。 | 字串[] |