共用方式為


Microsoft.網路連線 2015-05-01-preview

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.Network/connections@2015-05-01-preview' = {
  etag: 'string'
  location: 'string'
  name: 'string'
  properties: {
    connectionStatus: 'string'
    connectionType: 'string'
    egressBytesTransferred: int
    ingressBytesTransferred: int
    localNetworkGateway2: {
      etag: 'string'
      location: 'string'
      properties: {
        gatewayIpAddress: 'string'
        localNetworkAddressSpace: {
          addressPrefixes: [
            'string'
          ]
        }
        provisioningState: 'string'
        resourceGuid: 'string'
      }
      tags: {
        {customized property}: 'string'
      }
    }
    peer: {
      id: 'string'
    }
    provisioningState: 'string'
    resourceGuid: 'string'
    routingWeight: int
    sharedKey: 'string'
    virtualNetworkGateway1: {
      etag: 'string'
      location: 'string'
      properties: {
        enableBgp: bool
        gatewayDefaultSite: {
          id: 'string'
        }
        gatewayType: 'string'
        ipConfigurations: [
          {
            etag: 'string'
            id: 'string'
            name: 'string'
            properties: {
              privateIPAddress: 'string'
              privateIPAllocationMethod: 'string'
              provisioningState: 'string'
              publicIPAddress: {
                id: 'string'
              }
              subnet: {
                id: 'string'
              }
            }
          }
        ]
        provisioningState: 'string'
        resourceGuid: 'string'
        vpnType: 'string'
      }
      tags: {
        {customized property}: 'string'
      }
    }
    virtualNetworkGateway2: {
      etag: 'string'
      location: 'string'
      properties: {
        enableBgp: bool
        gatewayDefaultSite: {
          id: 'string'
        }
        gatewayType: 'string'
        ipConfigurations: [
          {
            etag: 'string'
            id: 'string'
            name: 'string'
            properties: {
              privateIPAddress: 'string'
              privateIPAllocationMethod: 'string'
              provisioningState: 'string'
              publicIPAddress: {
                id: 'string'
              }
              subnet: {
                id: 'string'
              }
            }
          }
        ]
        provisioningState: 'string'
        resourceGuid: 'string'
        vpnType: 'string'
      }
      tags: {
        {customized property}: 'string'
      }
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

屬性值

AddressSpace

名字 描述 價值
addressPrefixes 取得或設定在 CIDR 表示法中保留給此虛擬網路的位址區塊清單 string[]

LocalNetworkGateway

名字 描述 價值
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
性能 LocalNetworkGateway 屬性 LocalNetworkGatewayPropertiesFormat
標籤 資源標籤 ResourceTags

LocalNetworkGatewayPropertiesFormat

名字 描述 價值
gatewayIpAddress 局域網路閘道的IP位址。 字串
localNetworkAddressSpace 局域網路網站位址空間 AddressSpace
provisioningState 取得或設定 LocalNetworkGateway 資源的布建狀態更新/刪除/失敗 字串
resourceGuid 取得或設定 LocalNetworkGateway 資源的資源 GUID 屬性 字串

Microsoft.Network/connections

名字 描述 價值
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
名字 資源名稱 字串 (必要)
性能 VirtualNetworkGatewayConnection 属性 VirtualNetworkGatewayConnectionPropertiesFormat
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤

ResourceTags

名字 描述 價值

ResourceTags

名字 描述 價值

ResourceTags

名字 描述 價值

SubResource

名字 描述 價值
id 資源標識碼 字串

VirtualNetworkGateway

名字 描述 價值
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
性能 VirtualNetworkGateway 属性 VirtualNetworkGatewayPropertiesFormat
標籤 資源標籤 ResourceTags

VirtualNetworkGatewayConnectionPropertiesFormat

名字 描述 價值
connectionStatus 虛擬網路網關聯機狀態 'Connected'
'聯機'
'NotConnected'
'Unknown'
connectionType 網關聯機類型 IPsec/Dedicated/VpnClient/Vnet2Vnet 'ExpressRoute'
'IPsec'
'Vnet2Vnet'
'VPNClient'
egressBytesTransferred 在此連線中傳輸的輸出位元組 int
ingressBytesTransferred 在此連線中傳輸的輸入位元組 int
localNetworkGateway2 一般資源資訊的通用類別 LocalNetworkGateway
同輩 對等互連資源的參考。 SubResource
provisioningState 取得或設定 VirtualNetworkGatewayConnection 資源更新/刪除/失敗的布建狀態 字串
resourceGuid 取得或設定 VirtualNetworkGatewayConnection 資源的資源 guid 屬性 字串
routingWeight 路由權數。 int
sharedKey IPsec 共用金鑰。 字串
virtualNetworkGateway1 一般資源資訊的通用類別 VirtualNetworkGateway
virtualNetworkGateway2 一般資源資訊的通用類別 VirtualNetworkGateway

VirtualNetworkGatewayIpConfiguration

名字 描述 價值
etag 每當更新資源時變更的唯一隻讀字串 字串
id 資源標識碼 字串
名字 取得資源群組內唯一的資源名稱。 此名稱可用來存取資源 字串
性能 VirtualNetworkGatewayIPConfiguration 的屬性 VirtualNetworkGatewayIpConfigurationPropertiesFormat

VirtualNetworkGatewayIpConfigurationPropertiesFormat

名字 描述 價值
privateIPAddress 取得或設定網路介面IP組態的 privateIPAddress 字串
privateIPAllocationMethod 取得或設定 PrivateIP 設定方法 (靜態/動態) 'Dynamic'
'Static'
provisioningState 取得或設定 PublicIP 資源更新/刪除/失敗的布建狀態 字串
publicIPAddress 取得或設定 PublicIP 資源的參考 SubResource
取得或設定子網資源的參考 SubResource

VirtualNetworkGatewayPropertiesFormat

名字 描述 價值
enableBgp EnableBgp 旗標 bool
gatewayDefaultSite 取得或設定 LocalNetworkGateway 資源的參考,代表具有預設路由的局域網路網站。 如果移除現有的默認網站設定,請指派 Null 值。 SubResource
gatewayType 此虛擬網路閘道的類型。 'ExpressRoute'
'Vpn'
ipConfigurations 虛擬網路閘道的 IpConfigurations。 VirtualNetworkGatewayIpConfiguration[]
provisioningState 取得或設定 VirtualNetworkGateway 資源的布建狀態更新/刪除/失敗 字串
resourceGuid 取得或設定 VirtualNetworkGateway 資源的資源 GUID 屬性 字串
vpnType 此虛擬網路閘道的類型。 'PolicyBased'
'RouteBased'

快速入門範例

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

Bicep 檔案 描述
建立 BGP VNET 對 VNET 連線 此範本可讓您使用虛擬網路閘道和 BGP 連線兩個 VNET
使用 BGP 使用主動 VPN 閘道 站對站 VPN VPN 此範本可讓您在具有 VPN 閘道的兩個 VNet 之間部署站對站 VPN,以使用 BGP 設定主動-主動。 每個 Azure VPN 閘道都會解析遠端對等的 FQDN,以判斷遠端 VPN 閘道的公用 IP。 範本會在具有可用性區域的 Azure 區域中如預期般執行。

ARM 樣本資源定義

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

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

資源格式

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

{
  "type": "Microsoft.Network/connections",
  "apiVersion": "2015-05-01-preview",
  "name": "string",
  "etag": "string",
  "location": "string",
  "properties": {
    "connectionStatus": "string",
    "connectionType": "string",
    "egressBytesTransferred": "int",
    "ingressBytesTransferred": "int",
    "localNetworkGateway2": {
      "etag": "string",
      "location": "string",
      "properties": {
        "gatewayIpAddress": "string",
        "localNetworkAddressSpace": {
          "addressPrefixes": [ "string" ]
        },
        "provisioningState": "string",
        "resourceGuid": "string"
      },
      "tags": {
        "{customized property}": "string"
      }
    },
    "peer": {
      "id": "string"
    },
    "provisioningState": "string",
    "resourceGuid": "string",
    "routingWeight": "int",
    "sharedKey": "string",
    "virtualNetworkGateway1": {
      "etag": "string",
      "location": "string",
      "properties": {
        "enableBgp": "bool",
        "gatewayDefaultSite": {
          "id": "string"
        },
        "gatewayType": "string",
        "ipConfigurations": [
          {
            "etag": "string",
            "id": "string",
            "name": "string",
            "properties": {
              "privateIPAddress": "string",
              "privateIPAllocationMethod": "string",
              "provisioningState": "string",
              "publicIPAddress": {
                "id": "string"
              },
              "subnet": {
                "id": "string"
              }
            }
          }
        ],
        "provisioningState": "string",
        "resourceGuid": "string",
        "vpnType": "string"
      },
      "tags": {
        "{customized property}": "string"
      }
    },
    "virtualNetworkGateway2": {
      "etag": "string",
      "location": "string",
      "properties": {
        "enableBgp": "bool",
        "gatewayDefaultSite": {
          "id": "string"
        },
        "gatewayType": "string",
        "ipConfigurations": [
          {
            "etag": "string",
            "id": "string",
            "name": "string",
            "properties": {
              "privateIPAddress": "string",
              "privateIPAllocationMethod": "string",
              "provisioningState": "string",
              "publicIPAddress": {
                "id": "string"
              },
              "subnet": {
                "id": "string"
              }
            }
          }
        ],
        "provisioningState": "string",
        "resourceGuid": "string",
        "vpnType": "string"
      },
      "tags": {
        "{customized property}": "string"
      }
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

屬性值

AddressSpace

名字 描述 價值
addressPrefixes 取得或設定在 CIDR 表示法中保留給此虛擬網路的位址區塊清單 string[]

LocalNetworkGateway

名字 描述 價值
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
性能 LocalNetworkGateway 屬性 LocalNetworkGatewayPropertiesFormat
標籤 資源標籤 ResourceTags

LocalNetworkGatewayPropertiesFormat

名字 描述 價值
gatewayIpAddress 局域網路閘道的IP位址。 字串
localNetworkAddressSpace 局域網路網站位址空間 AddressSpace
provisioningState 取得或設定 LocalNetworkGateway 資源的布建狀態更新/刪除/失敗 字串
resourceGuid 取得或設定 LocalNetworkGateway 資源的資源 GUID 屬性 字串

Microsoft.Network/connections

名字 描述 價值
apiVersion API 版本 '2015-05-01-preview'
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
名字 資源名稱 字串 (必要)
性能 VirtualNetworkGatewayConnection 属性 VirtualNetworkGatewayConnectionPropertiesFormat
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
類型 資源類型 'Microsoft.Network/connections'

ResourceTags

名字 描述 價值

ResourceTags

名字 描述 價值

ResourceTags

名字 描述 價值

SubResource

名字 描述 價值
id 資源標識碼 字串

VirtualNetworkGateway

名字 描述 價值
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
性能 VirtualNetworkGateway 属性 VirtualNetworkGatewayPropertiesFormat
標籤 資源標籤 ResourceTags

VirtualNetworkGatewayConnectionPropertiesFormat

名字 描述 價值
connectionStatus 虛擬網路網關聯機狀態 'Connected'
'聯機'
'NotConnected'
'Unknown'
connectionType 網關聯機類型 IPsec/Dedicated/VpnClient/Vnet2Vnet 'ExpressRoute'
'IPsec'
'Vnet2Vnet'
'VPNClient'
egressBytesTransferred 在此連線中傳輸的輸出位元組 int
ingressBytesTransferred 在此連線中傳輸的輸入位元組 int
localNetworkGateway2 一般資源資訊的通用類別 LocalNetworkGateway
同輩 對等互連資源的參考。 SubResource
provisioningState 取得或設定 VirtualNetworkGatewayConnection 資源更新/刪除/失敗的布建狀態 字串
resourceGuid 取得或設定 VirtualNetworkGatewayConnection 資源的資源 guid 屬性 字串
routingWeight 路由權數。 int
sharedKey IPsec 共用金鑰。 字串
virtualNetworkGateway1 一般資源資訊的通用類別 VirtualNetworkGateway
virtualNetworkGateway2 一般資源資訊的通用類別 VirtualNetworkGateway

VirtualNetworkGatewayIpConfiguration

名字 描述 價值
etag 每當更新資源時變更的唯一隻讀字串 字串
id 資源標識碼 字串
名字 取得資源群組內唯一的資源名稱。 此名稱可用來存取資源 字串
性能 VirtualNetworkGatewayIPConfiguration 的屬性 VirtualNetworkGatewayIpConfigurationPropertiesFormat

VirtualNetworkGatewayIpConfigurationPropertiesFormat

名字 描述 價值
privateIPAddress 取得或設定網路介面IP組態的 privateIPAddress 字串
privateIPAllocationMethod 取得或設定 PrivateIP 設定方法 (靜態/動態) 'Dynamic'
'Static'
provisioningState 取得或設定 PublicIP 資源更新/刪除/失敗的布建狀態 字串
publicIPAddress 取得或設定 PublicIP 資源的參考 SubResource
取得或設定子網資源的參考 SubResource

VirtualNetworkGatewayPropertiesFormat

名字 描述 價值
enableBgp EnableBgp 旗標 bool
gatewayDefaultSite 取得或設定 LocalNetworkGateway 資源的參考,代表具有預設路由的局域網路網站。 如果移除現有的默認網站設定,請指派 Null 值。 SubResource
gatewayType 此虛擬網路閘道的類型。 'ExpressRoute'
'Vpn'
ipConfigurations 虛擬網路閘道的 IpConfigurations。 VirtualNetworkGatewayIpConfiguration[]
provisioningState 取得或設定 VirtualNetworkGateway 資源的布建狀態更新/刪除/失敗 字串
resourceGuid 取得或設定 VirtualNetworkGateway 資源的資源 GUID 屬性 字串
vpnType 此虛擬網路閘道的類型。 'PolicyBased'
'RouteBased'

快速入門範本

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

範本 描述
BOSH CF 跨區域

部署至 Azure
此範本可協助您設定在 Azure 上兩個區域部署 BOSH 和 Cloud Foundry 所需的資源。
將 ExpressRoute 線路連線至 VNET

部署至 Azure
此範本會建立 VNET、ExpresRoute 閘道,以及已設定 AzurePrivatePeering 的已佈建和已啟用 ExpressRoute 線路的連線。
建立 BGP VNET 對 VNET 連線

部署至 Azure
此範本可讓您使用虛擬網路閘道和 BGP 連線兩個 VNET
建立站對站 VPN 連線

部署至 Azure
此範本可讓您使用虛擬網路閘道建立站對站 VPN 連線
使用 VM 建立站對站 VPN 連線

部署至 Azure
此範本可讓您使用虛擬網路閘道建立站對站 VPN 連線
跨兩個區域建立 VNET 對 VNET 連線

部署至 Azure
此範本可讓您使用虛擬網路閘道連接不同區域中的兩個 VNET
建立三個 vNet 來示範可轉移的 BGP 連線

部署至 Azure
此範本會部署三個使用虛擬網路閘道和已啟用 BGP 連線的 vNet
部署 HBase 異地復寫

部署至 Azure
此範本可讓您使用 VPN vnet 對 vnet 連線,在兩個不同的區域中設定 HBase 複寫的 Azure 環境。
將現有的 Azure VNET 擴充至多 VNET 組態

部署至 Azure
此範本可讓您使用 VNET 對 VNET 閘道,將現有的單一 VNET 環境延伸至跨兩個資料中心區域延伸的多 VNET 環境
使用 BGP 使用主動 VPN 閘道 站對站 VPN VPN

部署至 Azure
此範本可讓您在具有 VPN 閘道的兩個 VNet 之間部署站對站 VPN,以使用 BGP 設定主動-主動。 每個 Azure VPN 閘道都會解析遠端對等的 FQDN,以判斷遠端 VPN 閘道的公用 IP。 範本會在具有可用性區域的 Azure 區域中如預期般執行。
VPN 自訂 IPSec 原則

部署至 Azure
此自定義IPSec原則允許更細微的IKE參數設定。 這可讓您部署站對站 VPN 原則,以支援 VPN Endpoit 裝置上的特定設定。

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/connections@2015-05-01-preview"
  name = "string"
  etag = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = jsonencode({
    properties = {
      connectionStatus = "string"
      connectionType = "string"
      egressBytesTransferred = int
      ingressBytesTransferred = int
      localNetworkGateway2 = {
        etag = "string"
        location = "string"
        properties = {
          gatewayIpAddress = "string"
          localNetworkAddressSpace = {
            addressPrefixes = [
              "string"
            ]
          }
          provisioningState = "string"
          resourceGuid = "string"
        }
        tags = {
          {customized property} = "string"
        }
      }
      peer = {
        id = "string"
      }
      provisioningState = "string"
      resourceGuid = "string"
      routingWeight = int
      sharedKey = "string"
      virtualNetworkGateway1 = {
        etag = "string"
        location = "string"
        properties = {
          enableBgp = bool
          gatewayDefaultSite = {
            id = "string"
          }
          gatewayType = "string"
          ipConfigurations = [
            {
              etag = "string"
              id = "string"
              name = "string"
              properties = {
                privateIPAddress = "string"
                privateIPAllocationMethod = "string"
                provisioningState = "string"
                publicIPAddress = {
                  id = "string"
                }
                subnet = {
                  id = "string"
                }
              }
            }
          ]
          provisioningState = "string"
          resourceGuid = "string"
          vpnType = "string"
        }
        tags = {
          {customized property} = "string"
        }
      }
      virtualNetworkGateway2 = {
        etag = "string"
        location = "string"
        properties = {
          enableBgp = bool
          gatewayDefaultSite = {
            id = "string"
          }
          gatewayType = "string"
          ipConfigurations = [
            {
              etag = "string"
              id = "string"
              name = "string"
              properties = {
                privateIPAddress = "string"
                privateIPAllocationMethod = "string"
                provisioningState = "string"
                publicIPAddress = {
                  id = "string"
                }
                subnet = {
                  id = "string"
                }
              }
            }
          ]
          provisioningState = "string"
          resourceGuid = "string"
          vpnType = "string"
        }
        tags = {
          {customized property} = "string"
        }
      }
    }
  })
}

屬性值

AddressSpace

名字 描述 價值
addressPrefixes 取得或設定在 CIDR 表示法中保留給此虛擬網路的位址區塊清單 string[]

LocalNetworkGateway

名字 描述 價值
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
性能 LocalNetworkGateway 屬性 LocalNetworkGatewayPropertiesFormat
標籤 資源標籤 ResourceTags

LocalNetworkGatewayPropertiesFormat

名字 描述 價值
gatewayIpAddress 局域網路閘道的IP位址。 字串
localNetworkAddressSpace 局域網路網站位址空間 AddressSpace
provisioningState 取得或設定 LocalNetworkGateway 資源的布建狀態更新/刪除/失敗 字串
resourceGuid 取得或設定 LocalNetworkGateway 資源的資源 GUID 屬性 字串

Microsoft.Network/connections

名字 描述 價值
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
名字 資源名稱 字串 (必要)
性能 VirtualNetworkGatewayConnection 属性 VirtualNetworkGatewayConnectionPropertiesFormat
標籤 資源標籤 標記名稱和值的字典。
類型 資源類型 “Microsoft.Network/connections@2015-05-01-preview”

ResourceTags

名字 描述 價值

ResourceTags

名字 描述 價值

ResourceTags

名字 描述 價值

SubResource

名字 描述 價值
id 資源標識碼 字串

VirtualNetworkGateway

名字 描述 價值
etag 取得唯一的唯一 字串
位置 資源位置 字串 (必要)
性能 VirtualNetworkGateway 属性 VirtualNetworkGatewayPropertiesFormat
標籤 資源標籤 ResourceTags

VirtualNetworkGatewayConnectionPropertiesFormat

名字 描述 價值
connectionStatus 虛擬網路網關聯機狀態 'Connected'
'聯機'
'NotConnected'
'Unknown'
connectionType 網關聯機類型 IPsec/Dedicated/VpnClient/Vnet2Vnet 'ExpressRoute'
'IPsec'
'Vnet2Vnet'
'VPNClient'
egressBytesTransferred 在此連線中傳輸的輸出位元組 int
ingressBytesTransferred 在此連線中傳輸的輸入位元組 int
localNetworkGateway2 一般資源資訊的通用類別 LocalNetworkGateway
同輩 對等互連資源的參考。 SubResource
provisioningState 取得或設定 VirtualNetworkGatewayConnection 資源更新/刪除/失敗的布建狀態 字串
resourceGuid 取得或設定 VirtualNetworkGatewayConnection 資源的資源 guid 屬性 字串
routingWeight 路由權數。 int
sharedKey IPsec 共用金鑰。 字串
virtualNetworkGateway1 一般資源資訊的通用類別 VirtualNetworkGateway
virtualNetworkGateway2 一般資源資訊的通用類別 VirtualNetworkGateway

VirtualNetworkGatewayIpConfiguration

名字 描述 價值
etag 每當更新資源時變更的唯一隻讀字串 字串
id 資源標識碼 字串
名字 取得資源群組內唯一的資源名稱。 此名稱可用來存取資源 字串
性能 VirtualNetworkGatewayIPConfiguration 的屬性 VirtualNetworkGatewayIpConfigurationPropertiesFormat

VirtualNetworkGatewayIpConfigurationPropertiesFormat

名字 描述 價值
privateIPAddress 取得或設定網路介面IP組態的 privateIPAddress 字串
privateIPAllocationMethod 取得或設定 PrivateIP 設定方法 (靜態/動態) 'Dynamic'
'Static'
provisioningState 取得或設定 PublicIP 資源更新/刪除/失敗的布建狀態 字串
publicIPAddress 取得或設定 PublicIP 資源的參考 SubResource
取得或設定子網資源的參考 SubResource

VirtualNetworkGatewayPropertiesFormat

名字 描述 價值
enableBgp EnableBgp 旗標 bool
gatewayDefaultSite 取得或設定 LocalNetworkGateway 資源的參考,代表具有預設路由的局域網路網站。 如果移除現有的默認網站設定,請指派 Null 值。 SubResource
gatewayType 此虛擬網路閘道的類型。 'ExpressRoute'
'Vpn'
ipConfigurations 虛擬網路閘道的 IpConfigurations。 VirtualNetworkGatewayIpConfiguration[]
provisioningState 取得或設定 VirtualNetworkGateway 資源的布建狀態更新/刪除/失敗 字串
resourceGuid 取得或設定 VirtualNetworkGateway 資源的資源 GUID 屬性 字串
vpnType 此虛擬網路閘道的類型。 'PolicyBased'
'RouteBased'