Microsoft.Network networkSecurityGroups/securityRules 2023-05-01
Bicep 資源定義
networkSecurityGroups/securityRules 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
備註
如需建立網路安全組的指引,請參閱使用 Bicep Create 虛擬網路資源。
資源格式
若要建立 Microsoft.Network/networkSecurityGroups/securityRules 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.Network/networkSecurityGroups/securityRules@2023-05-01' = {
name: 'string'
parent: resourceSymbolicName
properties: {
access: 'string'
description: 'string'
destinationAddressPrefix: 'string'
destinationAddressPrefixes: [
'string'
]
destinationApplicationSecurityGroups: [
{
id: 'string'
location: 'string'
properties: {}
tags: {}
}
]
destinationPortRange: 'string'
destinationPortRanges: [
'string'
]
direction: 'string'
priority: int
protocol: 'string'
sourceAddressPrefix: 'string'
sourceAddressPrefixes: [
'string'
]
sourceApplicationSecurityGroups: [
{
id: 'string'
location: 'string'
properties: {}
tags: {}
}
]
sourcePortRange: 'string'
sourcePortRanges: [
'string'
]
}
}
屬性值
networkSecurityGroups/securityRules
名稱 | 描述 | 值 |
---|---|---|
NAME | 資源名稱 瞭解如何在 Bicep 中設定子資源的名稱和類型。 |
需要字串 () 字元限制:1-80 合法字元: 英數字元、底線、句號和連字號。 以英數字元開頭。 以英數字元或底線結尾。 |
父系 (parent) | 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增此屬性。 如需詳細資訊,請參閱 父資源外部的子資源。 |
類型資源的符號名稱: networkSecurityGroups |
properties | 安全性規則的屬性。 | SecurityRulePropertiesFormat |
SecurityRulePropertiesFormat
名稱 | 描述 | 值 |
---|---|---|
access | 允許或拒絕網路流量。 | 'Allow' 需要 『Deny』 () |
description | 此規則的說明。 限制為140個字元。 | 字串 |
destinationAddressPrefix | 目的地地址前綴。 CIDR 或目的地IP範圍。 也可用星號 (*) 來比對所有的來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 | 字串 |
destinationAddressPrefixes | 目的地位址前置詞。 CIDR 或目的地IP範圍。 | string[] |
destinationApplicationSecurityGroups | 指定為目的地的應用程式安全組。 | ApplicationSecurityGroup[] |
destinationPortRange | 目的地埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 | 字串 |
destinationPortRanges | 目的地埠範圍。 | string[] |
direction | 規則的方向。 此方向指定是否根據連入或連出的流量評估規則。 | 'Inbound' 「輸出」 (必要) |
priority | 規則的優先順序。 此值可以介於 100 到 4096 之間。 集合中每個規則的優先順序數字必須是唯一的。 優先順序號碼愈小,規則優先順序就愈高。 | 需要 int () |
protocol | 此規則適用的網路通訊協定。 | '*' 'Ah' 'Esp' 'Icmp' 'Tcp' 必要 『Udp』 () |
sourceAddressPrefix | CIDR 或來源IP範圍。 也可用星號 (*) 來比對所有的來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 如果這是輸入規則,請指定網路流量的來源。 | 字串 |
sourceAddressPrefixes | CIDR 或來源IP範圍。 | string[] |
sourceApplicationSecurityGroups | 指定為來源的應用程式安全組。 | ApplicationSecurityGroup[] |
sourcePortRange | 來源埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 | 字串 |
sourcePortRanges | 來源埠範圍。 | string[] |
ApplicationSecurityGroup
名稱 | 描述 | 值 |
---|---|---|
id | 資源識別碼。 | 字串 |
location | 資源位置。 | 字串 |
properties | 應用程式安全組的屬性。 | ApplicationSecurityGroupPropertiesFormat |
tags | 資源標籤。 | 物件 (object) |
ApplicationSecurityGroupPropertiesFormat
此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。
快速入門範本
下列快速入門範本會部署此資源類型。
範本 | 描述 |
---|---|
部署 Darktrace 自動調整 vSensors |
此範本可讓您部署 Darktrace vSensors 的自動自動調整部署 |
ARM 範本資源定義
networkSecurityGroups/securityRules 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
備註
如需建立網路安全組的指引,請參閱使用 Bicep Create 虛擬網路資源。
資源格式
若要建立 Microsoft.Network/networkSecurityGroups/securityRules 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"apiVersion": "2023-05-01",
"name": "string",
"properties": {
"access": "string",
"description": "string",
"destinationAddressPrefix": "string",
"destinationAddressPrefixes": [ "string" ],
"destinationApplicationSecurityGroups": [
{
"id": "string",
"location": "string",
"properties": {},
"tags": {}
}
],
"destinationPortRange": "string",
"destinationPortRanges": [ "string" ],
"direction": "string",
"priority": "int",
"protocol": "string",
"sourceAddressPrefix": "string",
"sourceAddressPrefixes": [ "string" ],
"sourceApplicationSecurityGroups": [
{
"id": "string",
"location": "string",
"properties": {},
"tags": {}
}
],
"sourcePortRange": "string",
"sourcePortRanges": [ "string" ]
}
}
屬性值
networkSecurityGroups/securityRules
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | 'Microsoft.Network/networkSecurityGroups/securityRules' |
apiVersion | 資源 API 版本 | '2023-05-01' |
NAME | 資源名稱 瞭解如何在 JSON ARM 範本中設定子資源的名稱和類型。 |
需要字串 () 字元限制:1-80 合法字元: 英數字元、底線、句號和連字號。 以英數字元開頭。 以英數字元或底線結尾。 |
properties | 安全性規則的屬性。 | SecurityRulePropertiesFormat |
SecurityRulePropertiesFormat
名稱 | 描述 | 值 |
---|---|---|
access | 允許或拒絕網路流量。 | 'Allow' 需要 『Deny』 () |
description | 此規則的說明。 限制為140個字元。 | 字串 |
destinationAddressPrefix | 目的地地址前綴。 CIDR 或目的地IP範圍。 也可用星號 (*) 來比對所有的來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 | 字串 |
destinationAddressPrefixes | 目的地位址前置詞。 CIDR 或目的地IP範圍。 | string[] |
destinationApplicationSecurityGroups | 指定為目的地的應用程式安全組。 | ApplicationSecurityGroup[] |
destinationPortRange | 目的地埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 | 字串 |
destinationPortRanges | 目的地埠範圍。 | string[] |
direction | 規則的方向。 此方向指定是否根據連入或連出的流量評估規則。 | 'Inbound' 「輸出」 (必要) |
priority | 規則的優先順序。 此值可以介於 100 到 4096 之間。 集合中每個規則的優先順序數字必須是唯一的。 優先順序號碼愈小,規則優先順序就愈高。 | 需要 int () |
protocol | 此規則適用的網路通訊協定。 | '*' 'Ah' 'Esp' 'Icmp' 'Tcp' 必要 『Udp』 () |
sourceAddressPrefix | CIDR 或來源IP範圍。 也可用星號 (*) 來比對所有的來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 如果這是輸入規則,請指定網路流量的來源。 | 字串 |
sourceAddressPrefixes | CIDR 或來源IP範圍。 | string[] |
sourceApplicationSecurityGroups | 指定為來源的應用程式安全組。 | ApplicationSecurityGroup[] |
sourcePortRange | 來源埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 | 字串 |
sourcePortRanges | 來源埠範圍。 | string[] |
ApplicationSecurityGroup
名稱 | 描述 | 值 |
---|---|---|
id | 資源識別碼。 | 字串 |
location | 資源位置。 | 字串 |
properties | 應用程式安全組的屬性。 | ApplicationSecurityGroupPropertiesFormat |
tags | 資源標籤。 | 物件 (object) |
ApplicationSecurityGroupPropertiesFormat
此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。
快速入門範本
下列快速入門範本會部署此資源類型。
範本 | 描述 |
---|---|
部署 Darktrace 自動調整 vSensors |
此範本可讓您部署 Darktrace vSensors 的自動自動調整部署 |
Terraform (AzAPI 提供者) 資源定義
networkSecurityGroups/securityRules 資源類型可以使用目標作業來部署:
- 資源群組
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.Network/networkSecurityGroups/securityRules 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/networkSecurityGroups/securityRules@2023-05-01"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
access = "string"
description = "string"
destinationAddressPrefix = "string"
destinationAddressPrefixes = [
"string"
]
destinationApplicationSecurityGroups = [
{
id = "string"
location = "string"
properties = {}
tags = {}
}
]
destinationPortRange = "string"
destinationPortRanges = [
"string"
]
direction = "string"
priority = int
protocol = "string"
sourceAddressPrefix = "string"
sourceAddressPrefixes = [
"string"
]
sourceApplicationSecurityGroups = [
{
id = "string"
location = "string"
properties = {}
tags = {}
}
]
sourcePortRange = "string"
sourcePortRanges = [
"string"
]
}
})
}
屬性值
networkSecurityGroups/securityRules
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | “Microsoft.Network/networkSecurityGroups/securityRules@2023-05-01” |
NAME | 資源名稱 | 需要字串 () 字元限制:1-80 合法字元: 英數字元、底線、句號和連字號。 以英數字元開頭。 以英數字元或底線結尾。 |
parent_id | 此資源父系之資源的標識碼。 | 類型資源的標識碼: networkSecurityGroups |
properties | 安全性規則的屬性。 | SecurityRulePropertiesFormat |
SecurityRulePropertiesFormat
名稱 | 描述 | 值 |
---|---|---|
access | 允許或拒絕網路流量。 | “允許” “Deny” (必要) |
description | 此規則的說明。 限制為140個字元。 | 字串 |
destinationAddressPrefix | 目的地地址前綴。 CIDR 或目的地IP範圍。 也可用星號 (*) 來比對所有的來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 | 字串 |
destinationAddressPrefixes | 目的地位址前置詞。 CIDR 或目的地IP範圍。 | string[] |
destinationApplicationSecurityGroups | 指定為目的地的應用程式安全組。 | ApplicationSecurityGroup[] |
destinationPortRange | 目的地埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 | 字串 |
destinationPortRanges | 目的地埠範圍。 | string[] |
direction | 規則的方向。 此方向指定是否根據連入或連出的流量評估規則。 | “Inbound” 「輸出」 (必要) |
priority | 規則的優先順序。 此值可以介於 100 到 4096 之間。 集合中每個規則的優先順序數字必須是唯一的。 優先順序號碼愈小,規則優先順序就愈高。 | 需要 int () |
protocol | 此規則適用的網路通訊協定。 | "*" “Ah” “Esp” “Icmp” “Tcp” 必要 “Udp” () |
sourceAddressPrefix | CIDR 或來源IP範圍。 也可用星號 (*) 來比對所有的來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 如果這是輸入規則,請指定網路流量的來源。 | 字串 |
sourceAddressPrefixes | CIDR 或來源IP範圍。 | string[] |
sourceApplicationSecurityGroups | 指定為來源的應用程式安全組。 | ApplicationSecurityGroup[] |
sourcePortRange | 來源埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 | 字串 |
sourcePortRanges | 來源埠範圍。 | string[] |
ApplicationSecurityGroup
名稱 | 描述 | 值 |
---|---|---|
id | 資源識別碼。 | 字串 |
location | 資源位置。 | 字串 |
properties | 應用程式安全組的屬性。 | ApplicationSecurityGroupPropertiesFormat |
tags | 資源標籤。 | 物件 (object) |
ApplicationSecurityGroupPropertiesFormat
此物件不包含部署期間要設定的任何屬性。 所有屬性都是 ReadOnly。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應