Share via


Microsoft.Network networkProfiles 2023-02-01

Bicep 資源定義

networkProfiles 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Network/networkProfiles 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Network/networkProfiles@2023-02-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    containerNetworkInterfaceConfigurations: [
      {
        id: 'string'
        name: 'string'
        properties: {
          containerNetworkInterfaces: [
            {
              id: 'string'
            }
          ]
          ipConfigurations: [
            {
              id: 'string'
              name: 'string'
              properties: {
                subnet: {
                  id: 'string'
                  name: 'string'
                  properties: {
                    addressPrefix: 'string'
                    addressPrefixes: [
                      'string'
                    ]
                    applicationGatewayIPConfigurations: [
                      {
                        id: 'string'
                        name: 'string'
                        properties: {
                          subnet: {
                            id: 'string'
                          }
                        }
                      }
                    ]
                    delegations: [
                      {
                        id: 'string'
                        name: 'string'
                        properties: {
                          serviceName: 'string'
                        }
                        type: 'string'
                      }
                    ]
                    ipAllocations: [
                      {
                        id: 'string'
                      }
                    ]
                    natGateway: {
                      id: 'string'
                    }
                    networkSecurityGroup: {
                      id: 'string'
                      location: 'string'
                      properties: {
                        flushConnection: bool
                        securityRules: [
                          {
                            id: 'string'
                            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'
                              ]
                            }
                            type: 'string'
                          }
                        ]
                      }
                      tags: {}
                    }
                    privateEndpointNetworkPolicies: 'string'
                    privateLinkServiceNetworkPolicies: 'string'
                    routeTable: {
                      id: 'string'
                      location: 'string'
                      properties: {
                        disableBgpRoutePropagation: bool
                        routes: [
                          {
                            id: 'string'
                            name: 'string'
                            properties: {
                              addressPrefix: 'string'
                              hasBgpOverride: bool
                              nextHopIpAddress: 'string'
                              nextHopType: 'string'
                            }
                            type: 'string'
                          }
                        ]
                      }
                      tags: {}
                    }
                    serviceEndpointPolicies: [
                      {
                        id: 'string'
                        location: 'string'
                        properties: {
                          contextualServiceEndpointPolicies: [
                            'string'
                          ]
                          serviceAlias: 'string'
                          serviceEndpointPolicyDefinitions: [
                            {
                              id: 'string'
                              name: 'string'
                              properties: {
                                description: 'string'
                                service: 'string'
                                serviceResources: [
                                  'string'
                                ]
                              }
                              type: 'string'
                            }
                          ]
                        }
                        tags: {}
                      }
                    ]
                    serviceEndpoints: [
                      {
                        locations: [
                          'string'
                        ]
                        service: 'string'
                      }
                    ]
                  }
                  type: 'string'
                }
              }
            }
          ]
        }
      }
    ]
  }
}

屬性值

networkProfiles

名稱 描述
NAME 資源名稱 字串 (必要)
location 資源位置。 字串
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標記
properties 網路配置檔屬性。 NetworkProfilePropertiesFormat

NetworkProfilePropertiesFormat

名稱 描述
containerNetworkInterfaceConfigurations 閑置容器網路介面組態的清單。 ContainerNetworkInterfaceConfiguration[]

ContainerNetworkInterfaceConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 資源名稱。 此名稱可用來存取資源。 字串
properties 容器網路介面組態屬性。 ContainerNetworkInterfaceConfigurationPropertiesForm...

ContainerNetworkInterfaceConfigurationPropertiesForm...

名稱 描述
containerNetworkInterfaces 從這個容器網路介面組態建立的容器網路介面清單。 SubResource[]
ipConfigurations 容器網路介面組態的IP組態清單。 IPConfigurationProfile[]

SubResource

名稱 描述
id 資源識別碼。 字串

IPConfigurationProfile

名稱 描述
id 資源識別碼。 字串
NAME 資源名稱。 此名稱可用來存取資源。 字串
properties IP 組態配置檔的屬性。 IPConfigurationProfilePropertiesFormat

IPConfigurationProfilePropertiesFormat

名稱 描述
子網路 用來建立容器網路介面IP組態之子網資源的參考。 子網路

子網路

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 子網的屬性。 SubnetPropertiesFormat
類型 資源類型。 字串

SubnetPropertiesFormat

名稱 描述
addressPrefix 子網的位址前置詞。 字串
addressPrefixes 子網的位址前置詞清單。 string[]
applicationGatewayIPConfigurations 虛擬網路資源的應用程式閘道IP組態。 ApplicationGatewayIPConfiguration[]
代表團 子網上委派的參考陣列。 委派[]
ipAllocations 參考此子網的 IpAllocation 陣列。 SubResource[]
natGateway 與此子網相關聯的 Nat 閘道。 SubResource
networkSecurityGroup NetworkSecurityGroup 資源的參考。 NetworkSecurityGroup
privateEndpointNetworkPolicies 在子網的私人端點上啟用或停用套用網路原則。 'Disabled'
'Enabled'
privateLinkServiceNetworkPolicies 在子網中的私人連結服務上啟用或停用套用網路原則。 'Disabled'
'Enabled'
routeTable RouteTable 資源的參考。 RouteTable
serviceEndpointPolicies 服務端點原則的陣列。 ServiceEndpointPolicy[]
serviceEndpoints 服務端點的陣列。 ServiceEndpointPropertiesFormat[]

ApplicationGatewayIPConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 應用程式閘道 內唯一的IP組態名稱。 字串
properties 應用程式閘道IP組態的屬性。 ApplicationGatewayIPConfigurationPropertiesFormat

ApplicationGatewayIPConfigurationPropertiesFormat

名稱 描述
子網路 子網資源的參考。 應用程式閘道從中取得其私人位址的子網。 SubResource

委派

名稱 描述
id 資源識別碼。 字串
NAME 子網內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 子網的屬性。 ServiceDelegationPropertiesFormat
類型 資源類型。 字串

ServiceDelegationPropertiesFormat

名稱 描述
serviceName 子網應委派給的服務名稱 (,例如 Microsoft.Sql/servers) 。 字串

NetworkSecurityGroup

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 網路安全組的屬性。 NetworkSecurityGroupPropertiesFormat
tags 資源標籤。 物件 (object)

NetworkSecurityGroupPropertiesFormat

名稱 描述
flushConnection 啟用時,從網路安全組連線建立的流程會在更新規則時重新評估。 初始啟用將會觸發重新評估。 bool
securityRules 網路安全組的安全性規則集合。 SecurityRule[]

SecurityRule

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
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。

RouteTable

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 路由表的屬性。 RouteTablePropertiesFormat
tags 資源標籤。 物件 (object)

RouteTablePropertiesFormat

名稱 描述
disableBgpRoutePropagation 是否要停用 BGP 在該路由表上學習的路由。 True 表示停用。 bool
路由 路由表中包含的路由集合。 Route[]

路由

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 路由的屬性。 RoutePropertiesFormat
類型 資源類型。 字串

RoutePropertiesFormat

名稱 描述
addressPrefix 路由套用的目標 CIDR。 字串
hasBgpOverride 值,指出不論 LPM 為何,此路由是否覆寫重疊的 BGP 路由。 bool
nextHopIpAddress IP 位址封包應轉送至 。 只有在下一個躍點類型為 VirtualAppliance 的路由中,才允許下一個躍點值。 字串
nextHopType 要接收封包的 Azure 躍點的類型。 'Internet'
'None'
'VirtualAppliance'
'VirtualNetworkGateway'
'VnetLocal' (必要)

ServiceEndpointPolicy

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 服務端點原則的屬性。 ServiceEndpointPolicyPropertiesFormat
tags 資源標籤。 物件 (object)

ServiceEndpointPolicyPropertiesFormat

名稱 描述
contextualServiceEndpointPolicies 內容服務端點原則的集合。 string[]
serviceAlias 指出原則是否屬於服務的別名 字串
serviceEndpointPolicyDefinitions 服務端點原則的服務端點原則定義集合。 ServiceEndpointPolicyDefinition[]

ServiceEndpointPolicyDefinition

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 服務端點原則定義的屬性。 ServiceEndpointPolicyDefinitionPropertiesFormat
類型 資源類型。 字串

ServiceEndpointPolicyDefinitionPropertiesFormat

名稱 描述
description 此規則的說明。 限制為140個字元。 字串
service 服務端點名稱。 字串
serviceResources 服務資源的清單。 string[]

ServiceEndpointPropertiesFormat

名稱 描述
位置 位置清單。 string[]
service 端點服務的型別。 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
在虛擬網路中 Create WordPress 網站

部署至 Azure
此範本會在虛擬網路中的容器實例上建立 WordPress 網站。 並輸出可存取 WordPress 網站的公用網站 FQDN。
Azure Cloud Shell - VNet

部署至 Azure
此範本會將 Azure Cloud Shell 資源部署到 Azure 虛擬網路。
具有 容器執行個體 和 應用程式閘道 的 Front Door

部署至 Azure
此範本會建立具有容器群組和 應用程式閘道 的 Front Door Standard/Premium。
Azure 容器執行個體 - VNet

部署至 Azure
將容器實例部署至 Azure 虛擬網路。

ARM 範本資源定義

networkProfiles 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Network/networkProfiles 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Network/networkProfiles",
  "apiVersion": "2023-02-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "containerNetworkInterfaceConfigurations": [
      {
        "id": "string",
        "name": "string",
        "properties": {
          "containerNetworkInterfaces": [
            {
              "id": "string"
            }
          ],
          "ipConfigurations": [
            {
              "id": "string",
              "name": "string",
              "properties": {
                "subnet": {
                  "id": "string",
                  "name": "string",
                  "properties": {
                    "addressPrefix": "string",
                    "addressPrefixes": [ "string" ],
                    "applicationGatewayIPConfigurations": [
                      {
                        "id": "string",
                        "name": "string",
                        "properties": {
                          "subnet": {
                            "id": "string"
                          }
                        }
                      }
                    ],
                    "delegations": [
                      {
                        "id": "string",
                        "name": "string",
                        "properties": {
                          "serviceName": "string"
                        },
                        "type": "string"
                      }
                    ],
                    "ipAllocations": [
                      {
                        "id": "string"
                      }
                    ],
                    "natGateway": {
                      "id": "string"
                    },
                    "networkSecurityGroup": {
                      "id": "string",
                      "location": "string",
                      "properties": {
                        "flushConnection": "bool",
                        "securityRules": [
                          {
                            "id": "string",
                            "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" ]
                            },
                            "type": "string"
                          }
                        ]
                      },
                      "tags": {}
                    },
                    "privateEndpointNetworkPolicies": "string",
                    "privateLinkServiceNetworkPolicies": "string",
                    "routeTable": {
                      "id": "string",
                      "location": "string",
                      "properties": {
                        "disableBgpRoutePropagation": "bool",
                        "routes": [
                          {
                            "id": "string",
                            "name": "string",
                            "properties": {
                              "addressPrefix": "string",
                              "hasBgpOverride": "bool",
                              "nextHopIpAddress": "string",
                              "nextHopType": "string"
                            },
                            "type": "string"
                          }
                        ]
                      },
                      "tags": {}
                    },
                    "serviceEndpointPolicies": [
                      {
                        "id": "string",
                        "location": "string",
                        "properties": {
                          "contextualServiceEndpointPolicies": [ "string" ],
                          "serviceAlias": "string",
                          "serviceEndpointPolicyDefinitions": [
                            {
                              "id": "string",
                              "name": "string",
                              "properties": {
                                "description": "string",
                                "service": "string",
                                "serviceResources": [ "string" ]
                              },
                              "type": "string"
                            }
                          ]
                        },
                        "tags": {}
                      }
                    ],
                    "serviceEndpoints": [
                      {
                        "locations": [ "string" ],
                        "service": "string"
                      }
                    ]
                  },
                  "type": "string"
                }
              }
            }
          ]
        }
      }
    ]
  }
}

屬性值

networkProfiles

名稱 描述
類型 資源類型 'Microsoft.Network/networkProfiles'
apiVersion 資源 API 版本 '2023-02-01'
NAME 資源名稱 需要字串 ()
location 資源位置。 字串
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties 網路配置檔屬性。 NetworkProfilePropertiesFormat

NetworkProfilePropertiesFormat

名稱 描述
containerNetworkInterfaceConfigurations 閑置容器網路介面組態的清單。 ContainerNetworkInterfaceConfiguration[]

ContainerNetworkInterfaceConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 資源名稱。 此名稱可用來存取資源。 字串
properties 容器網路介面組態屬性。 ContainerNetworkInterfaceConfigurationPropertiesForm...

ContainerNetworkInterfaceConfigurationPropertiesForm...

名稱 描述
containerNetworkInterfaces 從這個容器網路介面組態建立的容器網路介面清單。 SubResource[]
ipConfigurations 容器網路介面組態的IP組態清單。 IPConfigurationProfile[]

SubResource

名稱 描述
id 資源識別碼。 字串

IPConfigurationProfile

名稱 描述
id 資源識別碼。 字串
NAME 資源名稱。 此名稱可用來存取資源。 字串
properties IP 組態配置檔的屬性。 IPConfigurationProfilePropertiesFormat

IPConfigurationProfilePropertiesFormat

名稱 描述
子網路 用來建立容器網路介面IP組態之子網資源的參考。 子網路

子網路

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 子網的屬性。 SubnetPropertiesFormat
類型 資源類型。 字串

SubnetPropertiesFormat

名稱 描述
addressPrefix 子網的位址前置詞。 字串
addressPrefixes 子網的位址前置詞清單。 string[]
applicationGatewayIPConfigurations 虛擬網路資源的應用程式閘道IP組態。 ApplicationGatewayIPConfiguration[]
代表團 子網上委派的參考陣列。 委派[]
ipAllocations 參考此子網的 IpAllocation 陣列。 SubResource[]
natGateway 與此子網相關聯的 Nat 閘道。 SubResource
networkSecurityGroup NetworkSecurityGroup 資源的參考。 NetworkSecurityGroup
privateEndpointNetworkPolicies 在子網的私人端點上啟用或停用套用網路原則。 'Disabled'
'Enabled'
privateLinkServiceNetworkPolicies 在子網中的私人連結服務上啟用或停用套用網路原則。 'Disabled'
'Enabled'
routeTable RouteTable 資源的參考。 RouteTable
serviceEndpointPolicies 服務端點原則的陣列。 ServiceEndpointPolicy[]
serviceEndpoints 服務端點的陣列。 ServiceEndpointPropertiesFormat[]

ApplicationGatewayIPConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 應用程式閘道 內唯一的IP組態名稱。 字串
properties 應用程式閘道IP組態的屬性。 ApplicationGatewayIPConfigurationPropertiesFormat

ApplicationGatewayIPConfigurationPropertiesFormat

名稱 描述
子網路 子網資源的參考。 應用程式閘道從其中取得其私人位址的子網。 SubResource

委派

名稱 描述
id 資源識別碼。 字串
NAME 子網內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 子網的屬性。 ServiceDelegationPropertiesFormat
類型 資源類型。 字串

ServiceDelegationPropertiesFormat

名稱 描述
serviceName 子網應委派給的服務名稱 (例如 Microsoft.Sql/servers) 。 字串

NetworkSecurityGroup

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 網路安全組的屬性。 NetworkSecurityGroupPropertiesFormat
tags 資源標籤。 物件 (object)

NetworkSecurityGroupPropertiesFormat

名稱 描述
flushConnection 啟用時,從網路安全組連線建立的流程會在更新規則時重新評估。 初始啟用將會觸發重新評估。 bool
securityRules 網路安全組的安全性規則集合。 SecurityRule[]

SecurityRule

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
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。

RouteTable

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 路由表的屬性。 RouteTablePropertiesFormat
tags 資源標籤。 物件 (object)

RouteTablePropertiesFormat

名稱 描述
disableBgpRoutePropagation 是否要在該路由表上停用 BGP 所學習的路由。 True 表示停用。 bool
路由 路由表內含的路由集合。 Route[]

路由

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 路由的屬性。 RoutePropertiesFormat
類型 資源類型。 字串

RoutePropertiesFormat

名稱 描述
addressPrefix 路由套用的目標 CIDR。 字串
hasBgpOverride 值,指出不論 LPM 為何,此路由是否覆寫重疊的 BGP 路由。 bool
nextHopIpAddress IP 位址封包應轉送至 。 下一個躍點值只能在下一個躍點類型為 VirtualAppliance 的路由中允許。 字串
nextHopType 要接收封包的 Azure 躍點的類型。 'Internet'
'None'
'VirtualAppliance'
'VirtualNetworkGateway'
'VnetLocal' (必要)

ServiceEndpointPolicy

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 服務端點原則的屬性。 ServiceEndpointPolicyPropertiesFormat
tags 資源標籤。 物件 (object)

ServiceEndpointPolicyPropertiesFormat

名稱 描述
contextualServiceEndpointPolicies 關係型服務端點原則的集合。 string[]
serviceAlias 別名,指出原則是否屬於服務 字串
serviceEndpointPolicyDefinitions 服務端點原則的服務端點原則定義集合。 ServiceEndpointPolicyDefinition[]

ServiceEndpointPolicyDefinition

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 服務端點原則定義的屬性。 ServiceEndpointPolicyDefinitionPropertiesFormat
類型 資源類型。 字串

ServiceEndpointPolicyDefinitionPropertiesFormat

名稱 描述
description 此規則的說明。 限制為140個字元。 字串
service 服務端點名稱。 字串
serviceResources 服務資源清單。 string[]

ServiceEndpointPropertiesFormat

名稱 描述
位置 位置清單。 string[]
service 端點服務的型別。 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
Create 虛擬網路中的 WordPress 網站

部署至 Azure
此範本會在虛擬網路中的容器實例上建立 WordPress 網站。 並輸出可存取 WordPress 網站的公用網站 FQDN。
Azure Cloud Shell - VNet

部署至 Azure
此範本會將 Azure Cloud Shell 資源部署至 Azure 虛擬網路。
具有 容器執行個體 和 應用程式閘道 的 Front Door

部署至 Azure
此範本會建立具有容器群組和 應用程式閘道 的 Front Door Standard/Premium。
Azure 容器執行個體 - VNet

部署至 Azure
將容器實例部署至 Azure 虛擬網路。

Terraform (AzAPI 提供者) 資源定義

networkProfiles 資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Network/networkProfiles 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/networkProfiles@2023-02-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      containerNetworkInterfaceConfigurations = [
        {
          id = "string"
          name = "string"
          properties = {
            containerNetworkInterfaces = [
              {
                id = "string"
              }
            ]
            ipConfigurations = [
              {
                id = "string"
                name = "string"
                properties = {
                  subnet = {
                    id = "string"
                    name = "string"
                    properties = {
                      addressPrefix = "string"
                      addressPrefixes = [
                        "string"
                      ]
                      applicationGatewayIPConfigurations = [
                        {
                          id = "string"
                          name = "string"
                          properties = {
                            subnet = {
                              id = "string"
                            }
                          }
                        }
                      ]
                      delegations = [
                        {
                          id = "string"
                          name = "string"
                          properties = {
                            serviceName = "string"
                          }
                          type = "string"
                        }
                      ]
                      ipAllocations = [
                        {
                          id = "string"
                        }
                      ]
                      natGateway = {
                        id = "string"
                      }
                      networkSecurityGroup = {
                        id = "string"
                        location = "string"
                        properties = {
                          flushConnection = bool
                          securityRules = [
                            {
                              id = "string"
                              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"
                                ]
                              }
                              type = "string"
                            }
                          ]
                        }
                        tags = {}
                      }
                      privateEndpointNetworkPolicies = "string"
                      privateLinkServiceNetworkPolicies = "string"
                      routeTable = {
                        id = "string"
                        location = "string"
                        properties = {
                          disableBgpRoutePropagation = bool
                          routes = [
                            {
                              id = "string"
                              name = "string"
                              properties = {
                                addressPrefix = "string"
                                hasBgpOverride = bool
                                nextHopIpAddress = "string"
                                nextHopType = "string"
                              }
                              type = "string"
                            }
                          ]
                        }
                        tags = {}
                      }
                      serviceEndpointPolicies = [
                        {
                          id = "string"
                          location = "string"
                          properties = {
                            contextualServiceEndpointPolicies = [
                              "string"
                            ]
                            serviceAlias = "string"
                            serviceEndpointPolicyDefinitions = [
                              {
                                id = "string"
                                name = "string"
                                properties = {
                                  description = "string"
                                  service = "string"
                                  serviceResources = [
                                    "string"
                                  ]
                                }
                                type = "string"
                              }
                            ]
                          }
                          tags = {}
                        }
                      ]
                      serviceEndpoints = [
                        {
                          locations = [
                            "string"
                          ]
                          service = "string"
                        }
                      ]
                    }
                    type = "string"
                  }
                }
              }
            ]
          }
        }
      ]
    }
  })
}

屬性值

networkProfiles

名稱 描述
類型 資源類型 “Microsoft.Network/networkProfiles@2023-02-01”
NAME 資源名稱 需要字串 ()
location 資源位置。 字串
parent_id 若要部署至資源群組,請使用該資源群組的標識碼。 需要字串 ()
tags 資源標籤。 標記名稱和值的字典。
properties 網路配置檔屬性。 NetworkProfilePropertiesFormat

NetworkProfilePropertiesFormat

名稱 描述
containerNetworkInterfaceConfigurations 閑置容器網路介面組態的清單。 ContainerNetworkInterfaceConfiguration[]

ContainerNetworkInterfaceConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 資源名稱。 此名稱可用來存取資源。 字串
properties 容器網路介面組態屬性。 ContainerNetworkInterfaceConfigurationPropertiesForm...

ContainerNetworkInterfaceConfigurationPropertiesForm...

名稱 描述
containerNetworkInterfaces 從這個容器網路介面組態建立的容器網路介面清單。 SubResource[]
ipConfigurations 容器網路介面組態的IP組態清單。 IPConfigurationProfile[]

SubResource

名稱 描述
id 資源識別碼。 字串

IPConfigurationProfile

名稱 描述
id 資源識別碼。 字串
NAME 資源名稱。 此名稱可用來存取資源。 字串
properties IP 組態配置檔的屬性。 IPConfigurationProfilePropertiesFormat

IPConfigurationProfilePropertiesFormat

名稱 描述
子網路 用來建立容器網路介面IP組態之子網資源的參考。 子網路

子網路

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 子網的屬性。 SubnetPropertiesFormat
類型 資源類型。 字串

SubnetPropertiesFormat

名稱 描述
addressPrefix 子網的位址前置詞。 字串
addressPrefixes 子網的位址前置詞清單。 string[]
applicationGatewayIPConfigurations 虛擬網路資源的應用程式閘道IP組態。 ApplicationGatewayIPConfiguration[]
代表團 子網上委派的參考陣列。 委派[]
ipAllocations 參考此子網的 IpAllocation 陣列。 SubResource[]
natGateway 與此子網相關聯的 Nat 閘道。 SubResource
networkSecurityGroup NetworkSecurityGroup 資源的參考。 NetworkSecurityGroup
privateEndpointNetworkPolicies 在子網的私人端點上啟用或停用套用網路原則。 “Disabled”
“Enabled”
privateLinkServiceNetworkPolicies 在子網中的私人連結服務上啟用或停用套用網路原則。 “Disabled”
“Enabled”
routeTable RouteTable 資源的參考。 RouteTable
serviceEndpointPolicies 服務端點原則的陣列。 ServiceEndpointPolicy[]
serviceEndpoints 服務端點的陣列。 ServiceEndpointPropertiesFormat[]

ApplicationGatewayIPConfiguration

名稱 描述
id 資源識別碼。 字串
NAME 應用程式閘道 內唯一的IP組態名稱。 字串
properties 應用程式閘道IP組態的屬性。 ApplicationGatewayIPConfigurationPropertiesFormat

ApplicationGatewayIPConfigurationPropertiesFormat

名稱 描述
子網路 子網資源的參考。 應用程式閘道從中取得其私人位址的子網。 SubResource

委派

名稱 描述
id 資源識別碼。 字串
NAME 子網內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 子網的屬性。 ServiceDelegationPropertiesFormat
類型 資源類型。 字串

ServiceDelegationPropertiesFormat

名稱 描述
serviceName 子網應委派給的服務名稱 (,例如 Microsoft.Sql/servers) 。 字串

NetworkSecurityGroup

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 網路安全組的屬性。 NetworkSecurityGroupPropertiesFormat
tags 資源標籤。 物件 (object)

NetworkSecurityGroupPropertiesFormat

名稱 描述
flushConnection 啟用時,從網路安全組連線建立的流程會在更新規則時重新評估。 初始啟用將會觸發重新評估。 bool
securityRules 網路安全組的安全性規則集合。 SecurityRule[]

SecurityRule

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 安全性規則的屬性。 SecurityRulePropertiesFormat
類型 資源類型。 字串

SecurityRulePropertiesFormat

名稱 描述
access 允許或拒絕網路流量。 “Allow”
必要) 「拒絕」 (
description 此規則的說明。 限制為140個字元。 字串
destinationAddressPrefix 目的地位址前置詞。 CIDR 或目的地IP範圍。 也可用星號 (*) 來比對所有的來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 字串
destinationAddressPrefixes 目的地位址前置詞。 CIDR 或目的地IP範圍。 string[]
destinationApplicationSecurityGroups 指定為目的地的應用程式安全組。 ApplicationSecurityGroup[]
destinationPortRange 目的地埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 字串
destinationPortRanges 目的地埠範圍。 string[]
direction 規則的方向。 此方向指定是否根據連入或連出的流量評估規則。 “輸入”
必要) 的「輸出」 (
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。

RouteTable

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 路由表的屬性。 RouteTablePropertiesFormat
tags 資源標籤。 物件 (object)

RouteTablePropertiesFormat

名稱 描述
disableBgpRoutePropagation 是否要在該路由表上停用 BGP 所學習的路由。 True 表示停用。 bool
路由 路由表內含的路由集合。 Route[]

路由

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 路由的屬性。 RoutePropertiesFormat
類型 資源類型。 字串

RoutePropertiesFormat

名稱 描述
addressPrefix 路由套用的目標 CIDR。 字串
hasBgpOverride 值,指出不論 LPM 為何,此路由是否覆寫重疊的 BGP 路由。 bool
nextHopIpAddress IP 位址封包應轉送至 。 下一個躍點值只能在下一個躍點類型為 VirtualAppliance 的路由中允許。 字串
nextHopType 要接收封包的 Azure 躍點的類型。 “Internet”
"None"
“VirtualAppliance”
“VirtualNetworkGateway”
必要 (「VnetLocal」)

ServiceEndpointPolicy

名稱 描述
id 資源識別碼。 字串
location 資源位置。 字串
properties 服務端點原則的屬性。 ServiceEndpointPolicyPropertiesFormat
tags 資源標籤。 物件 (object)

ServiceEndpointPolicyPropertiesFormat

名稱 描述
contextualServiceEndpointPolicies 內容服務端點原則的集合。 string[]
serviceAlias 指出原則是否屬於服務的別名 字串
serviceEndpointPolicyDefinitions 服務端點原則的服務端點原則定義集合。 ServiceEndpointPolicyDefinition[]

ServiceEndpointPolicyDefinition

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties 服務端點原則定義的屬性。 ServiceEndpointPolicyDefinitionPropertiesFormat
類型 資源類型。 字串

ServiceEndpointPolicyDefinitionPropertiesFormat

名稱 描述
description 此規則的說明。 限制為140個字元。 字串
service 服務端點名稱。 字串
serviceResources 服務資源清單。 string[]

ServiceEndpointPropertiesFormat

名稱 描述
位置 位置清單。 string[]
service 端點服務的型別。 字串