虛擬網路的 Azure Resource Manager 範本範例Azure Resource Manager template samples for virtual network

下表包含 Azure Resource Manager 範本範例的連結。The following table includes links to Azure Resource Manager template samples. 您可以使用 Azure 入口網站、Azure CLI 或 Azure PowerShell 來部署範本。You can deploy templates using the Azure portal, Azure CLI, or Azure PowerShell. 若要了解如何撰寫您自己的範本,請參閱建立您的第一個範本了解 Azure Resource Manager 範本的結構和語法To learn how to author your own templates, see Create your first template and Understand the structure and syntax of Azure Resource Manager templates.

如需要在範本中使用的 JSON 語法和屬性,請參閱 Microsoft.Network 資源類型For the JSON syntax and properties to use in templates, see Microsoft.Network resource types.

TaskTask 描述Description
建立具有兩個子網路的虛擬網路Create a virtual network with two subnets 建立具有兩個子網路的虛擬網路。Creates a virtual network with two subnets.
透過網路虛擬設備路由傳送流量Route traffic through a network virtual appliance 建立具有三個子網路的虛擬網路。Creates a virtual network with three subnets. 將虛擬機器部署到每個子網路。Deploys a virtual machine into each of the subnets. 建立包含路由的路由表,以將流量從某個子網路透過另一個子網路中的虛擬機器導向第三個子網路。Creates a route table containing routes to direct traffic from one subnet to another through the virtual machine in the third subnet. 將路由表關聯至其中一個子網路。Associates the route table to one of the subnets.
建立 Azure 儲存體的虛擬網路服務端點Create a virtual network service endpoint for Azure Storage 建立具有兩個子網路、且每個子網路中各有一個虛擬介面的新虛擬網路。Creates a new virtual network with two subnets, and a network interface in each subnet. 讓服務端點可連線到其中一個子網路的 Azure 儲存體,並保護該子網路的新儲存體帳戶。Enables a service endpoint to Azure Storage for one of the subnets and secures a new storage account to that subnet.
將兩個虛擬網路連線Connect two virtual networks 建立兩個虛擬網路,以及兩者之間的虛擬網路對等互連。Creates two virtual networks and a virtual network peering between them.
建立具有多個 IP 位址的虛擬機器Create a virtual machine with multiple IP addresses 建立具有多個 IP 位址的 Windows 或 Linux VM。Creates a Windows or Linux VM with multiple IP addresses.
設定 IPv4 + IPv6 雙重堆疊虛擬網路Configure IPv4 + IPv6 dual stack virtual network 部署包含兩個 VM 和一個具備 IPv4 與 IPv6 公用 IP 位址的 Azure Basic Load Balancer 的雙重堆疊 (IPv4 + IPv6) 虛擬網路。Deploys dual-stack (IPv4+IPv6) virtual network with two VMs and an Azure Basic Load Balancer with IPv4 and IPv6 public IP addresses.