共用方式為


Microsoft.網路連線 2017-10-01

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.Network/connections@2017-10-01' = {
  etag: 'string'
  location: 'string'
  name: 'string'
  properties: {
    authorizationKey: 'string'
    connectionType: 'string'
    enableBgp: bool
    ipsecPolicies: [
      {
        dhGroup: 'string'
        ikeEncryption: 'string'
        ikeIntegrity: 'string'
        ipsecEncryption: 'string'
        ipsecIntegrity: 'string'
        pfsGroup: 'string'
        saDataSizeKilobytes: int
        saLifeTimeSeconds: int
      }
    ]
    localNetworkGateway2: {
      etag: 'string'
      id: 'string'
      location: 'string'
      properties: {
        bgpSettings: {
          asn: int
          bgpPeeringAddress: 'string'
          peerWeight: int
        }
        gatewayIpAddress: 'string'
        localNetworkAddressSpace: {
          addressPrefixes: [
            'string'
          ]
        }
        resourceGuid: 'string'
      }
      tags: {
        {customized property}: 'string'
      }
    }
    peer: {
      id: 'string'
    }
    resourceGuid: 'string'
    routingWeight: int
    sharedKey: 'string'
    usePolicyBasedTrafficSelectors: bool
    virtualNetworkGateway1: {
      etag: 'string'
      id: 'string'
      location: 'string'
      properties: {
        activeActive: bool
        bgpSettings: {
          asn: int
          bgpPeeringAddress: 'string'
          peerWeight: int
        }
        enableBgp: bool
        gatewayDefaultSite: {
          id: 'string'
        }
        gatewayType: 'string'
        ipConfigurations: [
          {
            etag: 'string'
            id: 'string'
            name: 'string'
            properties: {
              privateIPAllocationMethod: 'string'
              publicIPAddress: {
                id: 'string'
              }
              subnet: {
                id: 'string'
              }
            }
          }
        ]
        resourceGuid: 'string'
        sku: {
          capacity: int
          name: 'string'
          tier: 'string'
        }
        vpnClientConfiguration: {
          radiusServerAddress: 'string'
          radiusServerSecret: 'string'
          vpnClientAddressPool: {
            addressPrefixes: [
              'string'
            ]
          }
          vpnClientProtocols: [
            'string'
          ]
          vpnClientRevokedCertificates: [
            {
              etag: 'string'
              id: 'string'
              name: 'string'
              properties: {
                thumbprint: 'string'
              }
            }
          ]
          vpnClientRootCertificates: [
            {
              etag: 'string'
              id: 'string'
              name: 'string'
              properties: {
                publicCertData: 'string'
              }
            }
          ]
        }
        vpnType: 'string'
      }
      tags: {
        {customized property}: 'string'
      }
    }
    virtualNetworkGateway2: {
      etag: 'string'
      id: 'string'
      location: 'string'
      properties: {
        activeActive: bool
        bgpSettings: {
          asn: int
          bgpPeeringAddress: 'string'
          peerWeight: int
        }
        enableBgp: bool
        gatewayDefaultSite: {
          id: 'string'
        }
        gatewayType: 'string'
        ipConfigurations: [
          {
            etag: 'string'
            id: 'string'
            name: 'string'
            properties: {
              privateIPAllocationMethod: 'string'
              publicIPAddress: {
                id: 'string'
              }
              subnet: {
                id: 'string'
              }
            }
          }
        ]
        resourceGuid: 'string'
        sku: {
          capacity: int
          name: 'string'
          tier: 'string'
        }
        vpnClientConfiguration: {
          radiusServerAddress: 'string'
          radiusServerSecret: 'string'
          vpnClientAddressPool: {
            addressPrefixes: [
              'string'
            ]
          }
          vpnClientProtocols: [
            'string'
          ]
          vpnClientRevokedCertificates: [
            {
              etag: 'string'
              id: 'string'
              name: 'string'
              properties: {
                thumbprint: 'string'
              }
            }
          ]
          vpnClientRootCertificates: [
            {
              etag: 'string'
              id: 'string'
              name: 'string'
              properties: {
                publicCertData: 'string'
              }
            }
          ]
        }
        vpnType: 'string'
      }
      tags: {
        {customized property}: 'string'
      }
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

屬性值

Microsoft.Network/連接

名字 描述 價值
ETAG 取得唯一的唯一 字串
位置 資源位置。 字串
名字 資源名稱 字串 (必要)
性能 虛擬網路網關聯機的屬性。 VirtualNetworkGatewayConnectionPropertiesFormat (必要)
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤

地址空間

名字 描述 價值
address前綴 以 CIDR 表示法保留給此虛擬網路的位址區塊清單。 字串[]

Bgp設置

名字 描述 價值
asn (自動傳感器網路) BGP 喇叭的 ASN。 整數 (int)
bgp對等位址 這個 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
peerWeight 新增至此 BGP 喇叭所學習路由的權數。 整數 (int)

IpsecPolicy 策略

名字 描述 價值
dhGroup 公司 在 IKE 階段 1 中用於初始 SA 的 DH 群組。 'DHGroup1'
'DHGroup14'
'DHGroup2'
'DHGroup2048'
'DHGroup24'
'ECP256'
'ECP384'
'None' (必要)
ike加密 IKE 加密演算法 (IKE 階段 2)。 'AES128'
'AES192'
'AES256'
“DES”
'DES3' (必要)
ike誠信 IKE 完整性演算法 (IKE 階段 2)。 'MD5'
'SHA1'
'SHA256'
'SHA384' (必要)
ipsec加密 IPSec 加密演算法 (IKE 階段 1)。 'AES128'
'AES192'
'AES256'
“DES”
'DES3'
“GCMAES128”
“GCMAES192”
“GCMAES256”
'None' (必要)
ipsec完整性 IPSec 完整性演算法 (IKE 階段 1)。 “GCMAES128”
“GCMAES192”
“GCMAES256”
'MD5'
'SHA1'
'SHA256' (必要)
pfs集團 IKE 階段 2 中用於新子 SA 的 DH 群組。 'ECP256'
'ECP384'
“無”
“PFS1”
'PFS2'
“PFS2048”
'PFS24' (必要)
saDataSize千位元組 IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 承載大小 KB,適用於站對站 VPN 通道。 int (必要)
saLifeTimeSeconds IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 存留期,以秒為單位,用於站對站 VPN 通道。 int (必要)

本地網路閘道

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
位置 資源位置。 字串
性能 局域網路閘道的屬性。 LocalNetworkGatewayPropertiesFormat (必要)
標籤 資源標籤。 資源標籤

LocalNetworkGatewayPropertiesFormat

名字 描述 價值
bgp設置 局域網路閘道的 BGP 喇叭設定。 Bgp設置
閘道 IpAddress 局域網路閘道的IP位址。 字串
localNetworkAddressSpace 地址空間 局域網路網站位址空間。 地址空間
資源識別碼 LocalNetworkGateway 資源的資源 GUID 屬性。 字串

資源標籤

名字 描述 價值

資源標籤

名字 描述 價值

資源標籤

名字 描述 價值

子資源

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

虛擬網路閘道

名字 描述 價值
ETAG 取得唯一的唯一 字串
識別碼 資源標識碼。 字串
位置 資源位置。 字串
性能 虛擬網路閘道的屬性。 VirtualNetworkGatewayPropertiesFormat (必要)
標籤 資源標籤。 資源標籤

VirtualNetworkGatewayConnectionPropertiesFormat

名字 描述 價值
authorizationKey authorizationKey。 字串
連接類型 網關聯機類型。 可能的值為:『IPsec』、『Vnet2Vnet』、『ExpressRoute』和 『VPNClient。 “ExpressRoute”
“IPsec”
'Vnet2Vnet'
'VPNClient' (必要)
啟用 Bgp EnableBgp 旗標 布爾 (bool)
ipsec策略 此連線所要考慮的IPSec原則。 IpsecPolicy[]
localNetworkGateway2 局域網路網關資源的參考。 本地網路閘道
同輩 對等互連資源的參考。 子資源
資源識別碼 VirtualNetworkGatewayConnection 資源的資源 GUID 屬性。 字串
routingWeight 路由權數。 整數 (int)
共享密鑰 IPSec 共用金鑰。 字串
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 布爾 (bool)
virtualNetworkGateway1 虛擬網路閘道資源的參考。 VirtualNetworkGateway (必要)
虛擬網路閘道2 虛擬網路閘道資源的參考。 虛擬網路閘道

VirtualNetworkGatewayIPConfiguration

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 虛擬網路閘道IP組態的屬性。 VirtualNetworkGatewayIPConfigurationPropertiesFormat

VirtualNetworkGatewayIPConfigurationPropertiesFormat

名字 描述 價值
privateIPAllocationMethod 私人IP配置方法。 可能的值為:'Static' 和 'Dynamic'。 “動態”
“靜態”
publicIPAddress 位址 公用IP資源的參考。 子資源
子網資源的參考。 子資源

VirtualNetworkGatewayPropertiesFormat

名字 描述 價值
主動主動 ActiveActive 旗標 布爾 (bool)
bgp設置 虛擬網路閘道的 BGP 喇叭設定。 Bgp設置
啟用 Bgp 是否為此虛擬網路閘道啟用 BGP。 布爾 (bool)
閘道預設網站 LocalNetworkGateway 資源的參考,代表具有預設路由的局域網路網站。 如果移除現有的默認網站設定,請指派 Null 值。 子資源
閘道類型 此虛擬網路閘道的類型。 可能的值為:'Vpn' 和 'ExpressRoute'。 “ExpressRoute”
'VPN'
ip配置 虛擬網路閘道的IP組態。 VirtualNetworkGatewayIPConfiguration[]
資源識別碼 VirtualNetworkGateway 資源的資源 GUID 屬性。 字串
SKU VirtualNetworkGatewaySku 資源的參考,代表為虛擬網路網關選取的 SKU。 VirtualNetworkGatewaySku
vpnClient配置 代表 P2S VpnClient 組態的 VpnClientConfiguration 資源的參考。 VpnClientConfiguration
vpn類型 此虛擬網路閘道的類型。 可能的值為:'PolicyBased' 和 'RouteBased'。 '基於策略'
'基於路由'

VirtualNetworkGatewaySku

名字 描述 價值
能力 容量。 整數 (int)
名字 閘道 SKU 名稱。 “基本”
“高性能”
“標準”
“超性能”
“VpnGw1”
'VpnGw2'
'VpnGw3'
閘道 SKU 層。 “基本”
“高性能”
“標準”
“超性能”
“VpnGw1”
'VpnGw2'
'VpnGw3'

VpnClientConfiguration

名字 描述 價值
radiusServer位址 VPN 用戶端連線 VirtualNetworkGateway 資源的 radius 伺服器地址屬性。 字串
radiusServerSecret 的 Vpn 用戶端連線的 VirtualNetworkGateway 資源的 radius 秘密屬性。 字串
vpnClientAddressPool(vpnClientAddressPool) 地址空間資源的參考,代表 P2S VpnClient 的地址空間。 地址空間
vpnClientProtocols 協定 虛擬網路閘道的 VpnClientProtocols。 包含任何的字串數組:
'IkeV2'
'SSTP'
vpnClientRevokedCertificates 虛擬網路閘道的 VpnClientRevokedCertificate。 VpnClientRevokedCertificate[]
vpnClientRootCertificates 虛擬網路閘道的 VpnClientRootCertificate。 VpnClientRootCertificate[]

VpnClientRevokedCertificate

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 VPN 用戶端撤銷憑證的屬性。 VpnClientRevokedCertificatePropertiesFormat

VpnClientRevokedCertificatePropertiesFormat

名字 描述 價值
指紋 撤銷的 VPN 用戶端憑證指紋。 字串

VpnClientRootCertificate

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 vpn 用戶端跟證書的屬性。 VpnClientRootCertificatePropertiesFormat (必要)

VpnClientRootCertificatePropertiesFormat

名字 描述 價值
publicCertData 的 憑證公用數據。 字串 (必要)

使用範例

Azure 已驗證的模組

下列 Azure 驗證模組 可用來部署此資源類型。

模組 描述
虛擬網路網關聯機 虛擬網路網關聯機的AVM資源模組

Azure 快速入門範例

下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。

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": "2017-10-01",
  "name": "string",
  "etag": "string",
  "location": "string",
  "properties": {
    "authorizationKey": "string",
    "connectionType": "string",
    "enableBgp": "bool",
    "ipsecPolicies": [
      {
        "dhGroup": "string",
        "ikeEncryption": "string",
        "ikeIntegrity": "string",
        "ipsecEncryption": "string",
        "ipsecIntegrity": "string",
        "pfsGroup": "string",
        "saDataSizeKilobytes": "int",
        "saLifeTimeSeconds": "int"
      }
    ],
    "localNetworkGateway2": {
      "etag": "string",
      "id": "string",
      "location": "string",
      "properties": {
        "bgpSettings": {
          "asn": "int",
          "bgpPeeringAddress": "string",
          "peerWeight": "int"
        },
        "gatewayIpAddress": "string",
        "localNetworkAddressSpace": {
          "addressPrefixes": [ "string" ]
        },
        "resourceGuid": "string"
      },
      "tags": {
        "{customized property}": "string"
      }
    },
    "peer": {
      "id": "string"
    },
    "resourceGuid": "string",
    "routingWeight": "int",
    "sharedKey": "string",
    "usePolicyBasedTrafficSelectors": "bool",
    "virtualNetworkGateway1": {
      "etag": "string",
      "id": "string",
      "location": "string",
      "properties": {
        "activeActive": "bool",
        "bgpSettings": {
          "asn": "int",
          "bgpPeeringAddress": "string",
          "peerWeight": "int"
        },
        "enableBgp": "bool",
        "gatewayDefaultSite": {
          "id": "string"
        },
        "gatewayType": "string",
        "ipConfigurations": [
          {
            "etag": "string",
            "id": "string",
            "name": "string",
            "properties": {
              "privateIPAllocationMethod": "string",
              "publicIPAddress": {
                "id": "string"
              },
              "subnet": {
                "id": "string"
              }
            }
          }
        ],
        "resourceGuid": "string",
        "sku": {
          "capacity": "int",
          "name": "string",
          "tier": "string"
        },
        "vpnClientConfiguration": {
          "radiusServerAddress": "string",
          "radiusServerSecret": "string",
          "vpnClientAddressPool": {
            "addressPrefixes": [ "string" ]
          },
          "vpnClientProtocols": [ "string" ],
          "vpnClientRevokedCertificates": [
            {
              "etag": "string",
              "id": "string",
              "name": "string",
              "properties": {
                "thumbprint": "string"
              }
            }
          ],
          "vpnClientRootCertificates": [
            {
              "etag": "string",
              "id": "string",
              "name": "string",
              "properties": {
                "publicCertData": "string"
              }
            }
          ]
        },
        "vpnType": "string"
      },
      "tags": {
        "{customized property}": "string"
      }
    },
    "virtualNetworkGateway2": {
      "etag": "string",
      "id": "string",
      "location": "string",
      "properties": {
        "activeActive": "bool",
        "bgpSettings": {
          "asn": "int",
          "bgpPeeringAddress": "string",
          "peerWeight": "int"
        },
        "enableBgp": "bool",
        "gatewayDefaultSite": {
          "id": "string"
        },
        "gatewayType": "string",
        "ipConfigurations": [
          {
            "etag": "string",
            "id": "string",
            "name": "string",
            "properties": {
              "privateIPAllocationMethod": "string",
              "publicIPAddress": {
                "id": "string"
              },
              "subnet": {
                "id": "string"
              }
            }
          }
        ],
        "resourceGuid": "string",
        "sku": {
          "capacity": "int",
          "name": "string",
          "tier": "string"
        },
        "vpnClientConfiguration": {
          "radiusServerAddress": "string",
          "radiusServerSecret": "string",
          "vpnClientAddressPool": {
            "addressPrefixes": [ "string" ]
          },
          "vpnClientProtocols": [ "string" ],
          "vpnClientRevokedCertificates": [
            {
              "etag": "string",
              "id": "string",
              "name": "string",
              "properties": {
                "thumbprint": "string"
              }
            }
          ],
          "vpnClientRootCertificates": [
            {
              "etag": "string",
              "id": "string",
              "name": "string",
              "properties": {
                "publicCertData": "string"
              }
            }
          ]
        },
        "vpnType": "string"
      },
      "tags": {
        "{customized property}": "string"
      }
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

屬性值

Microsoft.Network/連接

名字 描述 價值
apiVersion API 版本 '2017-10-01'
ETAG 取得唯一的唯一 字串
位置 資源位置。 字串
名字 資源名稱 字串 (必要)
性能 虛擬網路網關聯機的屬性。 VirtualNetworkGatewayConnectionPropertiesFormat (必要)
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
類型 資源類型 “Microsoft.Network/connections”

地址空間

名字 描述 價值
address前綴 以 CIDR 表示法保留給此虛擬網路的位址區塊清單。 字串[]

Bgp設置

名字 描述 價值
asn (自動傳感器網路) BGP 喇叭的 ASN。 整數 (int)
bgp對等位址 這個 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
peerWeight 新增至此 BGP 喇叭所學習路由的權數。 整數 (int)

IpsecPolicy 策略

名字 描述 價值
dhGroup 公司 在 IKE 階段 1 中用於初始 SA 的 DH 群組。 'DHGroup1'
'DHGroup14'
'DHGroup2'
'DHGroup2048'
'DHGroup24'
'ECP256'
'ECP384'
'None' (必要)
ike加密 IKE 加密演算法 (IKE 階段 2)。 'AES128'
'AES192'
'AES256'
“DES”
'DES3' (必要)
ike誠信 IKE 完整性演算法 (IKE 階段 2)。 'MD5'
'SHA1'
'SHA256'
'SHA384' (必要)
ipsec加密 IPSec 加密演算法 (IKE 階段 1)。 'AES128'
'AES192'
'AES256'
“DES”
'DES3'
“GCMAES128”
“GCMAES192”
“GCMAES256”
'None' (必要)
ipsec完整性 IPSec 完整性演算法 (IKE 階段 1)。 “GCMAES128”
“GCMAES192”
“GCMAES256”
'MD5'
'SHA1'
'SHA256' (必要)
pfs集團 IKE 階段 2 中用於新子 SA 的 DH 群組。 'ECP256'
'ECP384'
“無”
“PFS1”
'PFS2'
“PFS2048”
'PFS24' (必要)
saDataSize千位元組 IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 承載大小 KB,適用於站對站 VPN 通道。 int (必要)
saLifeTimeSeconds IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 存留期,以秒為單位,用於站對站 VPN 通道。 int (必要)

本地網路閘道

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
位置 資源位置。 字串
性能 局域網路閘道的屬性。 LocalNetworkGatewayPropertiesFormat (必要)
標籤 資源標籤。 資源標籤

LocalNetworkGatewayPropertiesFormat

名字 描述 價值
bgp設置 局域網路閘道的 BGP 喇叭設定。 Bgp設置
閘道 IpAddress 局域網路閘道的IP位址。 字串
localNetworkAddressSpace 地址空間 局域網路網站位址空間。 地址空間
資源識別碼 LocalNetworkGateway 資源的資源 GUID 屬性。 字串

資源標籤

名字 描述 價值

資源標籤

名字 描述 價值

資源標籤

名字 描述 價值

子資源

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

虛擬網路閘道

名字 描述 價值
ETAG 取得唯一的唯一 字串
識別碼 資源標識碼。 字串
位置 資源位置。 字串
性能 虛擬網路閘道的屬性。 VirtualNetworkGatewayPropertiesFormat (必要)
標籤 資源標籤。 資源標籤

VirtualNetworkGatewayConnectionPropertiesFormat

名字 描述 價值
authorizationKey authorizationKey。 字串
連接類型 網關聯機類型。 可能的值為:『IPsec』、『Vnet2Vnet』、『ExpressRoute』和 『VPNClient。 “ExpressRoute”
“IPsec”
'Vnet2Vnet'
'VPNClient' (必要)
啟用 Bgp EnableBgp 旗標 布爾 (bool)
ipsec策略 此連線所要考慮的IPSec原則。 IpsecPolicy[]
localNetworkGateway2 局域網路網關資源的參考。 本地網路閘道
同輩 對等互連資源的參考。 子資源
資源識別碼 VirtualNetworkGatewayConnection 資源的資源 GUID 屬性。 字串
routingWeight 路由權數。 整數 (int)
共享密鑰 IPSec 共用金鑰。 字串
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 布爾 (bool)
virtualNetworkGateway1 虛擬網路閘道資源的參考。 VirtualNetworkGateway (必要)
虛擬網路閘道2 虛擬網路閘道資源的參考。 虛擬網路閘道

VirtualNetworkGatewayIPConfiguration

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 虛擬網路閘道IP組態的屬性。 VirtualNetworkGatewayIPConfigurationPropertiesFormat

VirtualNetworkGatewayIPConfigurationPropertiesFormat

名字 描述 價值
privateIPAllocationMethod 私人IP配置方法。 可能的值為:'Static' 和 'Dynamic'。 “動態”
“靜態”
publicIPAddress 位址 公用IP資源的參考。 子資源
子網資源的參考。 子資源

VirtualNetworkGatewayPropertiesFormat

名字 描述 價值
主動主動 ActiveActive 旗標 布爾 (bool)
bgp設置 虛擬網路閘道的 BGP 喇叭設定。 Bgp設置
啟用 Bgp 是否為此虛擬網路閘道啟用 BGP。 布爾 (bool)
閘道預設網站 LocalNetworkGateway 資源的參考,代表具有預設路由的局域網路網站。 如果移除現有的默認網站設定,請指派 Null 值。 子資源
閘道類型 此虛擬網路閘道的類型。 可能的值為:'Vpn' 和 'ExpressRoute'。 “ExpressRoute”
'VPN'
ip配置 虛擬網路閘道的IP組態。 VirtualNetworkGatewayIPConfiguration[]
資源識別碼 VirtualNetworkGateway 資源的資源 GUID 屬性。 字串
SKU VirtualNetworkGatewaySku 資源的參考,代表為虛擬網路網關選取的 SKU。 VirtualNetworkGatewaySku
vpnClient配置 代表 P2S VpnClient 組態的 VpnClientConfiguration 資源的參考。 VpnClientConfiguration
vpn類型 此虛擬網路閘道的類型。 可能的值為:'PolicyBased' 和 'RouteBased'。 '基於策略'
'基於路由'

VirtualNetworkGatewaySku

名字 描述 價值
能力 容量。 整數 (int)
名字 閘道 SKU 名稱。 “基本”
“高性能”
“標準”
“超性能”
“VpnGw1”
'VpnGw2'
'VpnGw3'
閘道 SKU 層。 “基本”
“高性能”
“標準”
“超性能”
“VpnGw1”
'VpnGw2'
'VpnGw3'

VpnClientConfiguration

名字 描述 價值
radiusServer位址 VPN 用戶端連線 VirtualNetworkGateway 資源的 radius 伺服器地址屬性。 字串
radiusServerSecret 的 Vpn 用戶端連線的 VirtualNetworkGateway 資源的 radius 秘密屬性。 字串
vpnClientAddressPool(vpnClientAddressPool) 地址空間資源的參考,代表 P2S VpnClient 的地址空間。 地址空間
vpnClientProtocols 協定 虛擬網路閘道的 VpnClientProtocols。 包含任何的字串數組:
'IkeV2'
'SSTP'
vpnClientRevokedCertificates 虛擬網路閘道的 VpnClientRevokedCertificate。 VpnClientRevokedCertificate[]
vpnClientRootCertificates 虛擬網路閘道的 VpnClientRootCertificate。 VpnClientRootCertificate[]

VpnClientRevokedCertificate

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 VPN 用戶端撤銷憑證的屬性。 VpnClientRevokedCertificatePropertiesFormat

VpnClientRevokedCertificatePropertiesFormat

名字 描述 價值
指紋 撤銷的 VPN 用戶端憑證指紋。 字串

VpnClientRootCertificate

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 vpn 用戶端跟證書的屬性。 VpnClientRootCertificatePropertiesFormat (必要)

VpnClientRootCertificatePropertiesFormat

名字 描述 價值
publicCertData 的 憑證公用數據。 字串 (必要)

使用範例

Azure 快速入門範本

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

範本 描述
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@2017-10-01"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    etag = "string"
    properties = {
      authorizationKey = "string"
      connectionType = "string"
      enableBgp = bool
      ipsecPolicies = [
        {
          dhGroup = "string"
          ikeEncryption = "string"
          ikeIntegrity = "string"
          ipsecEncryption = "string"
          ipsecIntegrity = "string"
          pfsGroup = "string"
          saDataSizeKilobytes = int
          saLifeTimeSeconds = int
        }
      ]
      localNetworkGateway2 = {
        etag = "string"
        id = "string"
        location = "string"
        properties = {
          bgpSettings = {
            asn = int
            bgpPeeringAddress = "string"
            peerWeight = int
          }
          gatewayIpAddress = "string"
          localNetworkAddressSpace = {
            addressPrefixes = [
              "string"
            ]
          }
          resourceGuid = "string"
        }
        tags = {
          {customized property} = "string"
        }
      }
      peer = {
        id = "string"
      }
      resourceGuid = "string"
      routingWeight = int
      sharedKey = "string"
      usePolicyBasedTrafficSelectors = bool
      virtualNetworkGateway1 = {
        etag = "string"
        id = "string"
        location = "string"
        properties = {
          activeActive = bool
          bgpSettings = {
            asn = int
            bgpPeeringAddress = "string"
            peerWeight = int
          }
          enableBgp = bool
          gatewayDefaultSite = {
            id = "string"
          }
          gatewayType = "string"
          ipConfigurations = [
            {
              etag = "string"
              id = "string"
              name = "string"
              properties = {
                privateIPAllocationMethod = "string"
                publicIPAddress = {
                  id = "string"
                }
                subnet = {
                  id = "string"
                }
              }
            }
          ]
          resourceGuid = "string"
          sku = {
            capacity = int
            name = "string"
            tier = "string"
          }
          vpnClientConfiguration = {
            radiusServerAddress = "string"
            radiusServerSecret = "string"
            vpnClientAddressPool = {
              addressPrefixes = [
                "string"
              ]
            }
            vpnClientProtocols = [
              "string"
            ]
            vpnClientRevokedCertificates = [
              {
                etag = "string"
                id = "string"
                name = "string"
                properties = {
                  thumbprint = "string"
                }
              }
            ]
            vpnClientRootCertificates = [
              {
                etag = "string"
                id = "string"
                name = "string"
                properties = {
                  publicCertData = "string"
                }
              }
            ]
          }
          vpnType = "string"
        }
        tags = {
          {customized property} = "string"
        }
      }
      virtualNetworkGateway2 = {
        etag = "string"
        id = "string"
        location = "string"
        properties = {
          activeActive = bool
          bgpSettings = {
            asn = int
            bgpPeeringAddress = "string"
            peerWeight = int
          }
          enableBgp = bool
          gatewayDefaultSite = {
            id = "string"
          }
          gatewayType = "string"
          ipConfigurations = [
            {
              etag = "string"
              id = "string"
              name = "string"
              properties = {
                privateIPAllocationMethod = "string"
                publicIPAddress = {
                  id = "string"
                }
                subnet = {
                  id = "string"
                }
              }
            }
          ]
          resourceGuid = "string"
          sku = {
            capacity = int
            name = "string"
            tier = "string"
          }
          vpnClientConfiguration = {
            radiusServerAddress = "string"
            radiusServerSecret = "string"
            vpnClientAddressPool = {
              addressPrefixes = [
                "string"
              ]
            }
            vpnClientProtocols = [
              "string"
            ]
            vpnClientRevokedCertificates = [
              {
                etag = "string"
                id = "string"
                name = "string"
                properties = {
                  thumbprint = "string"
                }
              }
            ]
            vpnClientRootCertificates = [
              {
                etag = "string"
                id = "string"
                name = "string"
                properties = {
                  publicCertData = "string"
                }
              }
            ]
          }
          vpnType = "string"
        }
        tags = {
          {customized property} = "string"
        }
      }
    }
  }
}

屬性值

Microsoft.Network/連接

名字 描述 價值
ETAG 取得唯一的唯一 字串
位置 資源位置。 字串
名字 資源名稱 字串 (必要)
性能 虛擬網路網關聯機的屬性。 VirtualNetworkGatewayConnectionPropertiesFormat (必要)
標籤 資源標籤 標記名稱和值的字典。
類型 資源類型 “Microsoft.Network/connections@2017-10-01”

地址空間

名字 描述 價值
address前綴 以 CIDR 表示法保留給此虛擬網路的位址區塊清單。 字串[]

Bgp設置

名字 描述 價值
asn (自動傳感器網路) BGP 喇叭的 ASN。 整數 (int)
bgp對等位址 這個 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
peerWeight 新增至此 BGP 喇叭所學習路由的權數。 整數 (int)

IpsecPolicy 策略

名字 描述 價值
dhGroup 公司 在 IKE 階段 1 中用於初始 SA 的 DH 群組。 'DHGroup1'
'DHGroup14'
'DHGroup2'
'DHGroup2048'
'DHGroup24'
'ECP256'
'ECP384'
'None' (必要)
ike加密 IKE 加密演算法 (IKE 階段 2)。 'AES128'
'AES192'
'AES256'
“DES”
'DES3' (必要)
ike誠信 IKE 完整性演算法 (IKE 階段 2)。 'MD5'
'SHA1'
'SHA256'
'SHA384' (必要)
ipsec加密 IPSec 加密演算法 (IKE 階段 1)。 'AES128'
'AES192'
'AES256'
“DES”
'DES3'
“GCMAES128”
“GCMAES192”
“GCMAES256”
'None' (必要)
ipsec完整性 IPSec 完整性演算法 (IKE 階段 1)。 “GCMAES128”
“GCMAES192”
“GCMAES256”
'MD5'
'SHA1'
'SHA256' (必要)
pfs集團 IKE 階段 2 中用於新子 SA 的 DH 群組。 'ECP256'
'ECP384'
“無”
“PFS1”
'PFS2'
“PFS2048”
'PFS24' (必要)
saDataSize千位元組 IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 承載大小 KB,適用於站對站 VPN 通道。 int (必要)
saLifeTimeSeconds IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 存留期,以秒為單位,用於站對站 VPN 通道。 int (必要)

本地網路閘道

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
位置 資源位置。 字串
性能 局域網路閘道的屬性。 LocalNetworkGatewayPropertiesFormat (必要)
標籤 資源標籤。 資源標籤

LocalNetworkGatewayPropertiesFormat

名字 描述 價值
bgp設置 局域網路閘道的 BGP 喇叭設定。 Bgp設置
閘道 IpAddress 局域網路閘道的IP位址。 字串
localNetworkAddressSpace 地址空間 局域網路網站位址空間。 地址空間
資源識別碼 LocalNetworkGateway 資源的資源 GUID 屬性。 字串

資源標籤

名字 描述 價值

資源標籤

名字 描述 價值

資源標籤

名字 描述 價值

子資源

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

虛擬網路閘道

名字 描述 價值
ETAG 取得唯一的唯一 字串
識別碼 資源標識碼。 字串
位置 資源位置。 字串
性能 虛擬網路閘道的屬性。 VirtualNetworkGatewayPropertiesFormat (必要)
標籤 資源標籤。 資源標籤

VirtualNetworkGatewayConnectionPropertiesFormat

名字 描述 價值
authorizationKey authorizationKey。 字串
連接類型 網關聯機類型。 可能的值為:『IPsec』、『Vnet2Vnet』、『ExpressRoute』和 『VPNClient。 “ExpressRoute”
“IPsec”
'Vnet2Vnet'
'VPNClient' (必要)
啟用 Bgp EnableBgp 旗標 布爾 (bool)
ipsec策略 此連線所要考慮的IPSec原則。 IpsecPolicy[]
localNetworkGateway2 局域網路網關資源的參考。 本地網路閘道
同輩 對等互連資源的參考。 子資源
資源識別碼 VirtualNetworkGatewayConnection 資源的資源 GUID 屬性。 字串
routingWeight 路由權數。 整數 (int)
共享密鑰 IPSec 共用金鑰。 字串
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 布爾 (bool)
virtualNetworkGateway1 虛擬網路閘道資源的參考。 VirtualNetworkGateway (必要)
虛擬網路閘道2 虛擬網路閘道資源的參考。 虛擬網路閘道

VirtualNetworkGatewayIPConfiguration

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 虛擬網路閘道IP組態的屬性。 VirtualNetworkGatewayIPConfigurationPropertiesFormat

VirtualNetworkGatewayIPConfigurationPropertiesFormat

名字 描述 價值
privateIPAllocationMethod 私人IP配置方法。 可能的值為:'Static' 和 'Dynamic'。 “動態”
“靜態”
publicIPAddress 位址 公用IP資源的參考。 子資源
子網資源的參考。 子資源

VirtualNetworkGatewayPropertiesFormat

名字 描述 價值
主動主動 ActiveActive 旗標 布爾 (bool)
bgp設置 虛擬網路閘道的 BGP 喇叭設定。 Bgp設置
啟用 Bgp 是否為此虛擬網路閘道啟用 BGP。 布爾 (bool)
閘道預設網站 LocalNetworkGateway 資源的參考,代表具有預設路由的局域網路網站。 如果移除現有的默認網站設定,請指派 Null 值。 子資源
閘道類型 此虛擬網路閘道的類型。 可能的值為:'Vpn' 和 'ExpressRoute'。 “ExpressRoute”
'VPN'
ip配置 虛擬網路閘道的IP組態。 VirtualNetworkGatewayIPConfiguration[]
資源識別碼 VirtualNetworkGateway 資源的資源 GUID 屬性。 字串
SKU VirtualNetworkGatewaySku 資源的參考,代表為虛擬網路網關選取的 SKU。 VirtualNetworkGatewaySku
vpnClient配置 代表 P2S VpnClient 組態的 VpnClientConfiguration 資源的參考。 VpnClientConfiguration
vpn類型 此虛擬網路閘道的類型。 可能的值為:'PolicyBased' 和 'RouteBased'。 '基於策略'
'基於路由'

VirtualNetworkGatewaySku

名字 描述 價值
能力 容量。 整數 (int)
名字 閘道 SKU 名稱。 “基本”
“高性能”
“標準”
“超性能”
“VpnGw1”
'VpnGw2'
'VpnGw3'
閘道 SKU 層。 “基本”
“高性能”
“標準”
“超性能”
“VpnGw1”
'VpnGw2'
'VpnGw3'

VpnClientConfiguration

名字 描述 價值
radiusServer位址 VPN 用戶端連線 VirtualNetworkGateway 資源的 radius 伺服器地址屬性。 字串
radiusServerSecret 的 Vpn 用戶端連線的 VirtualNetworkGateway 資源的 radius 秘密屬性。 字串
vpnClientAddressPool(vpnClientAddressPool) 地址空間資源的參考,代表 P2S VpnClient 的地址空間。 地址空間
vpnClientProtocols 協定 虛擬網路閘道的 VpnClientProtocols。 包含任何的字串數組:
'IkeV2'
'SSTP'
vpnClientRevokedCertificates 虛擬網路閘道的 VpnClientRevokedCertificate。 VpnClientRevokedCertificate[]
vpnClientRootCertificates 虛擬網路閘道的 VpnClientRootCertificate。 VpnClientRootCertificate[]

VpnClientRevokedCertificate

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 VPN 用戶端撤銷憑證的屬性。 VpnClientRevokedCertificatePropertiesFormat

VpnClientRevokedCertificatePropertiesFormat

名字 描述 價值
指紋 撤銷的 VPN 用戶端憑證指紋。 字串

VpnClientRootCertificate

名字 描述 價值
ETAG 每當更新資源時變更的唯一隻讀字串。 字串
識別碼 資源標識碼。 字串
名字 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
性能 vpn 用戶端跟證書的屬性。 VpnClientRootCertificatePropertiesFormat (必要)

VpnClientRootCertificatePropertiesFormat

名字 描述 價值
publicCertData 的 憑證公用數據。 字串 (必要)

使用範例

Azure 已驗證的模組

下列 Azure 驗證模組 可用來部署此資源類型。

模組 描述
虛擬網路網關聯機 虛擬網路網關聯機的AVM資源模組