Microsoft.Network virtualNetworks/subnets

Bicep 資源定義

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

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

備註

如需建立虛擬網路和子網的指引,請參閱 使用 Bicep 建立虛擬網路資源

資源格式

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

resource symbolicname 'Microsoft.Network/virtualNetworks/subnets@2023-04-01' = {
  name: 'string'
  parent: resourceSymbolicName
  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'
      }
    ]
  }
}

屬性值

virtualNetworks/subnets

名稱 描述
NAME 資源名稱

瞭解如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
父系 (parent) 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源之外宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: virtualNetworks
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

SubResource

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

委派

名稱 描述
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 端點服務的型別。 字串

快速入門範本

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

範本 描述
Azure 遊戲開發人員虛擬機擴展集

部署至 Azure
Azure 遊戲開發人員虛擬機擴展集包含 Unreal 等授權引擎。
多用戶端 VNS3 網路設備

部署至 Azure
VNS3 是僅限軟體的虛擬設備,可在雲端應用程式邊緣提供安全性設備、應用程式傳遞控制器和整合威脅管理裝置的合併功能。 主要優點:在雲端網路功能上,一律以端對端加密、同盟數據篩選、雲端區域、雲端提供者和/或容器、建立一個統一地址空間、可證明的加密密鑰控制、可大規模管理的網狀網路、雲端中的可靠 HA、隔離敏感性應用程式 (快速低成本的網路分割) 、應用程式內的分割 分析雲端中所有移動中的數據。 重要網路功能;虛擬路由器、交換器、防火牆、vpn 集中器、多播散發者,以及 WAF、NIDS、快取、Proxy Load Balancer 和其他第 4 層網路功能,VNS3 不需要新的知識或訓練來實作,因此您可以與現有的網路設備整合。
適用於雲端連線和安全性的 VNS3 網路設備

部署至 Azure
VNS3 是僅限軟體的虛擬設備,可在雲端應用程式邊緣提供安全性設備、應用程式傳遞控制器和統一威脅管理裝置的結合功能。 雲端網路功能的主要優點,一律是端對端加密、同盟數據篩選、雲端區域、雲端提供者和/或容器、建立一個統一地址空間、可證明的加密密鑰控制、可大規模管理網狀網路、雲端中的可靠 HA、隔離敏感性應用程式, (快速低成本的網路分割) 、分割應用程式內的網路分割、 分析雲端中所有移動中的數據。 重要網路功能;虛擬路由器、交換器、防火牆、vpn 儲存器、多播散發者,以及 WAF、NIDS、快取、Proxy、負載平衡器和其他第 4 層網路功能,VNS3 不需要新的知識或訓練來實作,因此您可以與現有的網路設備整合。
部署深色追蹤自動調整 vSensors

部署至 Azure
此範本可讓您部署 Darktrace vSensors 的自動自動調整部署
Elasticsearch 的 JMeter 環境

部署至 Azure
此範本會將 JMeter 環境部署到現有的虛擬網路。 一個主要節點和多個次級節點會部署到新的 jmeter 子網。 此範本可與 Elasticsearch 快速入門範本搭配使用。
GPU Vm 搭配 OBS-Studio、Skype、MS-Teams 進行事件串流

部署至 Azure
此範本會建立具有 OBS-Studio、Skype 的 GPU Vm,MS-Teams 用於事件串流。 它會使用新的計算堆疊,在新的 vnet、記憶體帳戶、nic 和公用 IP 中建立 VM。 以 Chocolately 套件管理員為基礎的所有安裝程式
SharePoint 訂閱 / 2019 / 2016 / 2013 已設定

部署至 Azure
此範本會建立 SharePoint 訂閱 / 2019 / 2016 / 2013 伺服器陣列,其中包含需要大量設定才能手動執行,包括使用 ADFS 的同盟驗證、OAuth 信任、User Profiles 服務和包含 2 個區域且包含多個路徑型和主機命名網站集合的 Web 應用程式。 在 SharePoint 虛擬機上,Chocolatey 可用來安裝最新版本的記事本++、Visual Studio Code、Azure Data Studio、Fiddler、ULS Viewer 和 7-Zip。
Azure Cloud Shell - VNet

部署至 Azure
此範本會將 Azure Cloud Shell 資源部署到 Azure 虛擬網路。
具有 ILB ASE 的 eShop 網站

部署至 Azure
App Service 環境是 Azure App Service 的進階服務方案選項,提供完全隔離的專用環境,能夠極為安全地執行 Azure App Service 應用程式,包括 Web Apps、Mobile Apps 和 API Apps。
部署中樞和輪輻拓撲沙盒

部署至 Azure
此範本會建立基本的中樞和輪輻拓撲設定。 它會建立具有 DMZ、管理、共用和閘道 (選擇性) 的中樞 VNet,其中兩個輪輻 VNet (開發和生產) 每個子網都包含工作負載子網。 它也會在中樞的管理子網上部署 Windows Jump-Host,並在中樞與兩個輪輻之間建立 VNet 對等互連。
沒有公用IP位址的 Azure Batch集區

部署至 Azure
此範本會建立 Azure Batch 簡化的節點通訊集區,而不需公用IP位址。
部署簡單的UbuntuLinux VM 18.04-LTS

部署至 Azure
此範本會部署具有一些 VM 選項的 Ubuntu Server。 您可以提供 VM 名稱、OS 版本、VM 大小、系統管理員使用者名稱和密碼。 VM 大小預設為 Standard_B2s,而 O.S 版本為 18.04-LTS。
使用標籤部署簡單的 Windows VM

部署至 Azure
此範本會部署D2_v3 Windows VM、NIC、記憶體帳戶、虛擬網路、公用IP位址和網路安全組。 標記物件會在變數中建立,並會在適用的情況下套用到所有資源上。
Azure 容器執行個體 - VNet

部署至 Azure
將容器實例部署至 Azure 虛擬網路。
使用 Azure DMS 遷移至 Azure SQL 資料庫

部署至 Azure
Azure 資料移轉服務 (DMS) 的設計目的是簡化將內部部署資料庫移轉至 Azure 的程式。 DMS 將簡化現有內部部署 SQL Server 和 Oracle 資料庫的移轉,以在 Azure 虛擬機中 Azure SQL 資料庫、Azure SQL 受控執行個體 或 Microsoft SQL Server。 此範本會部署 Azure 資料庫移轉服務的實例、已安裝 SQL Server 的 Azure VM,其會作為來源伺服器,其具有預先建立的資料庫,以及目標 Azure SQL DB 伺服器,該伺服器將具有要從來源移轉至目標伺服器的預先建立資料庫架構。 此範本也會部署所需的資源,例如 NIC、vnet 等,以支援來源 VM、DMS 服務和目標伺服器。
部署 Azure 資料移轉服務 (DMS)

部署至 Azure
Azure 資料庫移轉服務是一個完全受控的服務,其設計目的是能夠從多個資料庫來源無縫移轉到 Azure 資料平台,將停機時間降到最低 (線上移轉)。
使用 VNet 部署 適用於 MariaDB 的 Azure 資料庫

部署至 Azure
此範本提供使用 VNet 整合部署適用於 MariaDB 的 Azure 資料庫的方法。
使用 VNet 部署 適用於 MySQL 的 Azure 資料庫 (彈性)

部署至 Azure
此範本提供使用 VNet 整合部署適用於 MySQL 的彈性伺服器 Azure 資料庫的方法。
使用 VNet 部署 適用於 MySQL 的 Azure 資料庫

部署至 Azure
此範本提供部署適用於 MySQL 的 Azure 資料庫與 VNet 整合的方式。
使用 VNet 部署 適用於 PostgreSQL 的 Azure 資料庫 (彈性)

部署至 Azure
此範本提供使用 VNet 整合部署適用於 PostgreSQL 的彈性伺服器 Azure 資料庫的方式。
使用 VNet 部署 適用於 PostgreSQL 的 Azure 資料庫

部署至 Azure
此範本提供部署適用於 PostgreSQL 的 Azure 資料庫與 VNet 整合的方式。
建立 Azure 付款 HSM

部署至 Azure
此範本會建立 Azure 付款 HSM,以提供 Azure 雲端中即時、重大付款交易的密碼編譯密鑰作業。
Integration Service Environment 範本

部署至 Azure
建立虛擬網路、4 個子網,然後建立整合服務環境 (ISE) 的範本,包括非原生連接器。 作為需要Logic Apps ISE之範本的基底。
Azure Machine Learning 端對端安全設定

部署至 Azure
這組 Bicep 範本示範如何在安全設定中設定 Azure Machine Learning 端對端。 此參考實作包括工作區、計算叢集、計算實例和連結的私人 AKS 叢集。
Azure Machine Learning 端對端安全設定 (舊版)

部署至 Azure
這組 Bicep 範本示範如何在安全設定中設定 Azure Machine Learning 端對端。 此參考實作包括工作區、計算叢集、計算實例和連結的私人 AKS 叢集。
(vnet) 建立 Azure Machine Learning 服務工作區

部署至 Azure
此部署範本會指定 Azure Machine Learning 工作區及其相關聯的資源,包括 Azure 金鑰保存庫、Azure 記憶體、Azure 應用程式 Insights 和 Azure Container Registry。 此組態描述您在網路隔離設定中開始使用 Azure Machine Learning 所需的資源集。
(舊版) 建立 Azure Machine Learning 服務工作區

部署至 Azure
此部署範本會指定 Azure Machine Learning 工作區及其相關聯的資源,包括 Azure 金鑰保存庫、Azure 記憶體、Azure 應用程式 Insights 和 Azure Container Registry。 此組態描述您在網路隔離設定中開始使用 Azure Machine Learning 所需的資源集。
使用 SMB 磁碟區建立新的 ANF 資源

部署至 Azure
此範本可讓您使用單一容量集區和使用SMB通訊協定設定的單一磁碟區來建立新的 Azure NetApp Files 資源。
Azure Bastion 即服務

部署至 Azure
此範本會在 虛擬網路 中布建 Azure Bastion
具有 NSG 的 Azure Bastion 即服務

部署至 Azure
此範本會在 虛擬網路 中布建 Azure Bastion
建立 Azure 防火牆、用戶端 VM 和伺服器 VM 的沙箱

部署至 Azure
此範本會建立具有 2 個子網的虛擬網路, (伺服器子網和 AzureFirewall 子網) 、伺服器 VM、用戶端 VM、每個 VM 的公用 IP 位址,以及透過防火牆傳送 VM 之間的流量路由表。
建立具有多個公用 IP 位址的 Azure 防火牆

部署至 Azure
此範本會建立一個 Azure 防火牆,其中包含兩個公用IP位址和兩部 Windows Server 2019 伺服器進行測試。
安全虛擬中樞

部署至 Azure
此範本會使用 Azure 防火牆 建立安全的虛擬中樞,以保護目的地為因特網的雲端網路流量。
建立標準內部負載平衡器

部署至 Azure
此範本會建立具有規則負載平衡埠 80 的標準內部 Azure Load Balancer
建立跨區域負載平衡器

部署至 Azure
此範本會建立具有包含兩個區域負載平衡器的後端集區跨區域負載平衡器。 跨區域負載平衡器目前可在有限的區域中使用。 跨區域負載平衡器背後的區域負載平衡器可以位於任何區域中。
依IP位址使用後端集區 Standard Load Balancer

部署至 Azure
此範本可用來示範如何使用ARM樣本,依IP位址設定 Load Balancer的後端集區,如後端集區管理檔中所述。
建立標準負載平衡器

部署至 Azure
此範本會為後端集區建立因特網面向的負載平衡器、負載平衡規則和三個 VM,並在備援區域中具有每個 VM。
使用 VM 虛擬網路 NAT

部署至 Azure
部署 NAT 閘道和虛擬機
在新子網中建立路由伺服器

部署至 Azure
此範本會將路由伺服器部署到名為 RouteServerSubnet 的子網。
將子網新增至現有的 VNET

部署至 Azure
此範本可讓您將子網新增至現有的 VNET。 部署至現有 VNET 的資源群組
Azure Virtual WAN 路由意圖和原則

部署至 Azure
此範本會布建 Azure Virtual WAN,並啟用路由意圖和原則功能的兩個中樞。
將具有 Redis 安全性規則的 NSG 新增至現有的子網

部署至 Azure
此範本可讓您將具有預先設定 Azure Redis 快取安全性規則的 NSG 新增至 VNET 內的現有子網。 部署至現有 VNET 的資源群組。
私人端點範例

部署至 Azure
此範本示範如何建立指向 Azure SQL 伺服器的私人端點
使用 Azure SQL 後端 App Service 環境

部署至 Azure
此範本會建立具有 Azure SQL 後端以及私人端點以及通常用於私人/隔離環境中的相關聯資源 App Service 環境。
具有私人端點的 Web 應用程式

部署至 Azure
此範本可讓您建立 Web 應用程式,並透過私人端點公開它
在 ASEv3 中建立 AppServicePlan 和 App

部署至 Azure
在 ASEv3 中建立 AppServicePlan 和 App

ARM 範本資源定義

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

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

備註

如需建立虛擬網路和子網的指引,請參閱 使用 Bicep 建立虛擬網路資源

資源格式

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

{
  "type": "Microsoft.Network/virtualNetworks/subnets",
  "apiVersion": "2023-04-01",
  "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"
      }
    ]
  }
}

屬性值

virtualNetworks/subnets

名稱 描述
類型 資源類型 'Microsoft.Network/virtualNetworks/subnets'
apiVersion 資源 API 版本 '2023-04-01'
NAME 資源名稱

請參閱如何在 JSON ARM 樣本中設定子資源的名稱和類型。
字串 (必要)

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
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

SubResource

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

委派

名稱 描述
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 端點服務的型別。 字串

快速入門範本

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

範本 描述
Azure 遊戲開發人員虛擬機擴展集

部署至 Azure
Azure 遊戲開發人員虛擬機擴展集包含 Unreal 等授權引擎。
多用戶端 VNS3 網路設備

部署至 Azure
VNS3 是僅限軟體的虛擬設備,可在雲端應用程式邊緣提供安全性設備、應用程式傳遞控制器和整合威脅管理裝置的合併功能。 主要優點:在雲端網路功能上,一律以端對端加密、同盟數據篩選、雲端區域、雲端提供者和/或容器、建立一個統一地址空間、可證明的加密密鑰控制、可大規模管理的網狀網路、雲端中的可靠 HA、隔離敏感性應用程式 (快速低成本的網路分割) 、應用程式內的分割 分析雲端中所有移動中的數據。 重要網路功能;虛擬路由器、交換器、防火牆、vpn 集中器、多播散發者,以及 WAF、NIDS、快取、Proxy Load Balancer 和其他第 4 層網路功能,VNS3 不需要新的知識或訓練來實作,因此您可以與現有的網路設備整合。
適用於雲端連線和安全性的 VNS3 網路設備

部署至 Azure
VNS3 是僅限軟體的虛擬設備,可在雲端應用程式邊緣提供安全性設備、應用程式傳遞控制器和統一威脅管理裝置的結合功能。 雲端網路功能的主要優點,一律是端對端加密、同盟數據篩選、雲端區域、雲端提供者和/或容器、建立一個統一地址空間、可證明的加密密鑰控制、可大規模管理網狀網路、雲端中的可靠 HA、隔離敏感性應用程式, (快速低成本的網路分割) 、分割應用程式內的網路分割、 分析雲端中所有移動中的數據。 重要網路功能;虛擬路由器、交換器、防火牆、vpn 儲存器、多播散發者,以及 WAF、NIDS、快取、Proxy、負載平衡器和其他第 4 層網路功能,VNS3 不需要新的知識或訓練來實作,因此您可以與現有的網路設備整合。
部署深色追蹤自動調整 vSensors

部署至 Azure
此範本可讓您部署 Darktrace vSensors 的自動自動調整部署
Elasticsearch 的 JMeter 環境

部署至 Azure
此範本會將 JMeter 環境部署到現有的虛擬網路。 一個主要節點和多個次級節點會部署到新的 jmeter 子網。 此範本可與 Elasticsearch 快速入門範本搭配使用。
GPU Vm 搭配 OBS-Studio、Skype、MS-Teams 進行事件串流

部署至 Azure
此範本會建立具有 OBS-Studio、Skype 的 GPU Vm,MS-Teams 用於事件串流。 它會使用新的計算堆疊,在新的 vnet、記憶體帳戶、nic 和公用 IP 中建立 VM。 以 Chocolately 套件管理員為基礎的所有安裝程式
SharePoint 訂閱 / 2019 / 2016 / 2013 全部設定

部署至 Azure
此範本會建立 SharePoint 訂閱 / 2019 / 2016 / 2013 伺服器陣列,此伺服器數位具有大量設定,其需要手動執行,包括 ADFS 的同盟驗證、OAuth 信任、使用者配置檔服務和包含 2 個區域且包含多個路徑型和主機命名網站集合的 Web 應用程式。 在 SharePoint 虛擬機上,Chocolatey 可用來安裝最新版本的記事本++、Visual Studio Code、Azure Data Studio、Fiddler、ULS Viewer 和 7-Zip。
Azure Cloud Shell - VNet

部署至 Azure
此範本會將 Azure Cloud Shell 資源部署到 Azure 虛擬網路。
使用 ILB ASE 的 eShop 網站

部署至 Azure
App Service 環境是 Azure App Service 的進階服務方案選項,提供完全隔離的專用環境,能夠極為安全地執行 Azure App Service 應用程式,包括 Web Apps、Mobile Apps 和 API Apps。
部署中樞和輪輻拓撲沙盒

部署至 Azure
此範本會建立基本的中樞和輪輻拓撲設定。 它會建立具有 DMZ、管理、共用和閘道 (選擇性) 的中樞 VNet,其中兩個輪輻 VNet (開發和生產) 包含工作負載子網。 它也會在中樞的管理子網上部署 Windows Jump-Host,並在中樞與兩個輪輻之間建立 VNet 對等互連。
沒有公用IP位址的 Azure Batch集區

部署至 Azure
此範本會建立 Azure Batch 簡化的節點通訊集區,而不需要公用IP位址。
部署簡單的UbuntuLinux VM 18.04-LTS

部署至 Azure
此範本會部署具有一些 VM 選項的 Ubuntu Server。 您可以提供 VM 名稱、OS 版本、VM 大小、系統管理員使用者名稱和密碼。 VM 大小預設為 Standard_B2s,而 O.S 版本為 18.04-LTS。
使用標籤部署簡單的 Windows VM

部署至 Azure
此範本會部署D2_v3 Windows VM、NIC、記憶體帳戶、虛擬網路、公用IP位址和網路安全組。 卷標物件會在變數中建立,並在適用的情況下套用至所有資源。
Azure 容器執行個體 - VNet

部署至 Azure
將容器實例部署至 Azure 虛擬網路。
使用 Azure DMS 遷移至 Azure SQL 資料庫

部署至 Azure
Azure 資料移轉服務 (DMS) 的設計目的是簡化將內部部署資料庫移轉至 Azure 的程式。 DMS 可簡化將現有的內部部署 SQL Server 和 Oracle 資料庫移轉至 Azure 虛擬機中的 Azure SQL 資料庫、Azure SQL 受控執行個體 或 Microsoft SQL Server。 此範本會部署 Azure 資料庫移轉服務的實例、已安裝 SQL Server 的 Azure VM,其會作為來源伺服器,其中包含其上預先建立的資料庫,以及目標 Azure SQL DB 伺服器,其具有要從來源移轉至目標伺服器的預先建立資料庫架構。 此範本也會部署所需的資源,例如 NIC、vnet 等,以支援來源 VM、DMS 服務和目標伺服器。
部署 Azure 資料移轉服務 (DMS)

部署至 Azure
Azure 資料庫移轉服務是一個完全受控的服務,其設計目的是能夠從多個資料庫來源無縫移轉到 Azure 資料平台,將停機時間降到最低 (線上移轉)。
使用 VNet 部署 適用於 MariaDB 的 Azure 資料庫

部署至 Azure
此範本提供一種方式來部署適用於 MariaDB 的 Azure 資料庫與 VNet 整合。
使用 VNet 部署 適用於 MySQL 的 Azure 資料庫 (彈性)

部署至 Azure
此範本提供使用 VNet 整合部署適用於 MySQL 的彈性伺服器 Azure 資料庫的方法。
使用 VNet 部署 適用於 MySQL 的 Azure 資料庫

部署至 Azure
此範本提供使用 VNet 整合部署適用於 MySQL 的 Azure 資料庫的方法。
使用 VNet 部署 適用於 PostgreSQL 的 Azure 資料庫 (彈性)

部署至 Azure
此範本提供使用 VNet 整合部署適用於 PostgreSQL 的彈性伺服器 Azure 資料庫的方法。
使用 VNet 部署 適用於 PostgreSQL 的 Azure 資料庫

部署至 Azure
此範本提供一種方式來部署適用於PostgreSQL的 Azure 資料庫與 VNet 整合。
建立 Azure 付款 HSM

部署至 Azure
此範本會建立 Azure 付款 HSM,以提供 Azure 雲端中即時、重大付款交易的密碼編譯密鑰作業。
Integration Service Environment 範本

部署至 Azure
建立虛擬網路、4 個子網,然後建立 Integration Service Environment (ISE) 的範本,包括非原生連接器。 作為需要Logic Apps ISE之範本的基底。
Azure Machine Learning 端對端安全設定

部署至 Azure
這組 Bicep 範本示範如何在安全設定中端對端設定 Azure Machine Learning。 此參考實作包括 Workspace、計算叢集、計算實例和附加的私人 AKS 叢集。
Azure Machine Learning 端對端安全設定 (舊版)

部署至 Azure
這組 Bicep 範本示範如何在安全設定中端對端設定 Azure Machine Learning。 此參考實作包括 Workspace、計算叢集、計算實例和附加的私人 AKS 叢集。
(vnet) 建立 Azure Machine Learning 服務工作區

部署至 Azure
此部署範本會指定 Azure Machine Learning 工作區及其相關聯的資源,包括 Azure 金鑰保存庫、Azure 記憶體、Azure 應用程式 Insights 和 Azure Container Registry。 此組態描述在網路隔離設定中開始使用 Azure Machine Learning 所需的一組資源。
(舊版) 建立 Azure Machine Learning 服務工作區

部署至 Azure
此部署範本會指定 Azure Machine Learning 工作區及其相關聯的資源,包括 Azure 金鑰保存庫、Azure 記憶體、Azure 應用程式 Insights 和 Azure Container Registry。 此組態描述在網路隔離設定中開始使用 Azure Machine Learning 所需的一組資源。
使用 SMB 磁碟區建立新的 ANF 資源

部署至 Azure
此範本可讓您建立新的 Azure NetApp Files 資源,其中包含單一容量集區和使用SMB通訊協定設定的單一磁碟區。
Azure Bastion 即服務

部署至 Azure
此範本會在 虛擬網路 中布建 Azure Bastion
具有 NSG 的 Azure Bastion 即服務

部署至 Azure
此範本會在 虛擬網路 中布建 Azure Bastion
建立 Azure 防火牆、用戶端 VM 和伺服器 VM 的沙箱

部署至 Azure
此範本會建立具有 2 個子網的虛擬網路, (伺服器子網和 AzureFirewall 子網) 、伺服器 VM、用戶端 VM、每個 VM 的公用 IP 位址,以及路由表以透過防火牆傳送 VM 之間的流量。
建立具有多個公用 IP 位址的 Azure 防火牆

部署至 Azure
此範本會建立一個 Azure 防火牆,其中包含兩個公用IP位址和兩部 Windows Server 2019 伺服器進行測試。
安全虛擬中樞

部署至 Azure
此範本會使用 Azure 防火牆 建立安全的虛擬中樞,以保護目的地為因特網的雲端網路流量。
建立標準內部負載平衡器

部署至 Azure
此範本會使用規則負載平衡埠 80 建立標準內部 Azure Load Balancer
建立跨區域負載平衡器

部署至 Azure
此範本會建立具有包含兩個區域負載平衡器的後端集區跨區域負載平衡器。 跨區域負載平衡器目前可在有限的區域中使用。 跨區域負載平衡器背後的區域負載平衡器可以位於任何區域中。
依IP位址使用後端集區 Standard Load Balancer

部署至 Azure
此範本可用來示範如何使用ARM樣本,依IP位址設定 Load Balancer的後端集區,如後端集區管理檔中所述。
建立標準負載平衡器

部署至 Azure
此範本會為後端集區建立因特網面向的負載平衡器、負載平衡規則和三個 VM,並在備援區域中具有每個 VM。
使用 VM 虛擬網路 NAT

部署至 Azure
部署 NAT 閘道和虛擬機
在新子網中建立路由伺服器

部署至 Azure
此範本會將路由伺服器部署到名為 RouteServerSubnet 的子網。
將子網新增至現有的 VNET

部署至 Azure
此範本可讓您將子網新增至現有的 VNET。 部署至現有 VNET 的資源群組
Azure Virtual WAN 路由意圖和原則

部署至 Azure
此範本會布建 Azure Virtual WAN,並啟用路由意圖和原則功能的兩個中樞。
將具有 Redis 安全性規則的 NSG 新增至現有的子網

部署至 Azure
此範本可讓您將具有預先設定 Azure Redis 快取安全性規則的 NSG 新增至 VNET 內的現有子網。 部署至現有 VNET 的資源群組。
私人端點範例

部署至 Azure
此範本示範如何建立指向 Azure SQL Server 的私人端點
使用 Azure SQL 後端 App Service 環境

部署至 Azure
此範本會建立具有 Azure SQL 後端的 App Service 環境,以及私人端點,以及通常用於私人/隔離環境中的相關聯資源。
具有私人端點的 Web 應用程式

部署至 Azure
此範本可讓您建立 Web 應用程式,並透過私人端點公開它
在 ASEv3 中建立 AppServicePlan 和 App

部署至 Azure
在 ASEv3 中建立 AppServicePlan 和 App

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/virtualNetworks/subnets@2023-04-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    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"
        }
      ]
    }
  })
}

屬性值

virtualNetworks/subnets

名稱 描述
類型 資源類型 “Microsoft.Network/virtualNetworks/subnets@2023-04-01”
NAME 資源名稱 字串 (必要)

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
parent_id 此資源之父系的資源標識碼。 類型資源的標識碼: virtualNetworks
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

SubResource

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

委派

名稱 描述
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 端點服務的型別。 字串