共用方式為


Vpn Sites - Create Or Update

如果 VpnSite 資源不存在,請建立 VpnSite 資源,否則會更新現有的 VpnSite。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}?api-version=2023-09-01

URI 參數

名稱 位於 必要 類型 Description
resourceGroupName
path True

string

VpnSite 的資源組名。

subscriptionId
path True

string

可唯一識別 Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶識別碼會構成每個服務呼叫 URI 的一部分。

vpnSiteName
path True

string

要建立或更新之 VpnSite 的名稱。

api-version
query True

string

用戶端 API 版本。

要求本文

名稱 必要 類型 Description
location True

string

資源位置。

id

string

資源識別碼。

properties.addressSpace

AddressSpace

AddressSpace,其中包含IP位址範圍的數位。

properties.bgpProperties

BgpSettings

bgp 屬性集。

properties.deviceProperties

DeviceProperties

裝置屬性。

properties.ipAddress

string

vpn-site 的IP位址。

properties.isSecuritySite

boolean

IsSecuritySite 旗標。

properties.o365Policy

O365PolicyProperties

Office365 原則。

properties.siteKey

string

可用於連線的 vpn 月臺金鑰。

properties.virtualWan

SubResource

vpnSite 所屬的 VirtualWAN。

properties.vpnSiteLinks

VpnSiteLink[]

所有 VPN 網站連結的清單。

tags

object

資源標籤。

回應

名稱 類型 Description
200 OK

VpnSite

要求成功。 傳回 VpnSite 建立或更新的詳細數據。

201 Created

VpnSite

已成功收到要求。 傳回 VpnSite 建立或更新的詳細數據。

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

VpnSiteCreate

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1?api-version=2023-09-01

{
  "tags": {
    "key1": "value1"
  },
  "location": "West US",
  "properties": {
    "virtualWan": {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1"
    },
    "addressSpace": {
      "addressPrefixes": [
        "10.0.0.0/16"
      ]
    },
    "isSecuritySite": false,
    "vpnSiteLinks": [
      {
        "name": "vpnSiteLink1",
        "properties": {
          "ipAddress": "50.50.50.56",
          "fqdn": "link1.vpnsite1.contoso.com",
          "linkProperties": {
            "linkProviderName": "vendor1",
            "linkSpeedInMbps": 0
          },
          "bgpProperties": {
            "bgpPeeringAddress": "192.168.0.0",
            "asn": 1234
          }
        }
      }
    ],
    "o365Policy": {
      "breakOutCategories": {
        "allow": true,
        "optimize": true,
        "default": false
      }
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1",
  "etag": "w/\\00000000-0000-0000-0000-000000000000\\",
  "location": "West US",
  "name": "vpnSite1",
  "type": "Microsoft.Network/vpnSites",
  "tags": {
    "key1": "value1"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "virtualWan": {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1"
    },
    "deviceProperties": {
      "linkSpeedInMbps": 0
    },
    "addressSpace": {
      "addressPrefixes": [
        "10.0.0.0/16"
      ]
    },
    "isSecuritySite": false,
    "vpnSiteLinks": [
      {
        "name": "vpnSiteLink1",
        "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/vpnSiteLink1",
        "etag": "W/\"00000000-0000-0000-0000-000000000000\"",
        "type": "Microsoft.Network/vpnSites/vpnSiteLinks",
        "properties": {
          "provisioningState": "Succeeded",
          "ipAddress": "50.50.50.56",
          "linkProperties": {
            "linkProviderName": "vendor1",
            "linkSpeedInMbps": 0
          },
          "bgpProperties": {
            "bgpPeeringAddress": "192.168.0.0",
            "asn": 1234
          }
        }
      }
    ]
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1",
  "etag": "w/\\00000000-0000-0000-0000-000000000000\\",
  "location": "West US",
  "name": "vpnSite1",
  "type": "Microsoft.Network/vpnSites",
  "tags": {
    "key1": "value1"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "virtualWan": {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1"
    },
    "deviceProperties": {
      "linkSpeedInMbps": 0
    },
    "addressSpace": {
      "addressPrefixes": [
        "10.0.0.0/16"
      ]
    },
    "isSecuritySite": false,
    "vpnSiteLinks": [
      {
        "name": "vpnSiteLink1",
        "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/vpnSiteLink1",
        "etag": "W/\"00000000-0000-0000-0000-000000000000\"",
        "properties": {
          "provisioningState": "Succeeded",
          "ipAddress": "50.50.50.56",
          "linkProperties": {
            "linkProviderName": "vendor1",
            "linkSpeedInMbps": 0
          },
          "bgpProperties": {
            "bgpPeeringAddress": "192.168.0.0",
            "asn": 1234
          }
        }
      }
    ]
  }
}

定義

名稱 Description
AddressSpace

Addressspace 包含可供虛擬網路的子網路使用的 IP 位址範圍陣列。

BgpSettings

BGP 設定詳細數據。

CloudError

來自服務的錯誤回應。

CloudErrorBody

來自服務的錯誤回應。

DeviceProperties

裝置的屬性清單。

IPConfigurationBgpPeeringAddress

IPConfigurationBgpPeeringAddress 的屬性。

O365BreakOutCategoryPolicies

Office365 分項類別。

O365PolicyProperties

Office365 中斷原則。

ProvisioningState

目前的布建狀態。

SubResource

另一個子資源的參考。

VpnLinkBgpSettings

連結的 BGP 設定詳細數據。

VpnLinkProviderProperties

連結提供者的屬性清單。

VpnSite

VpnSite 資源。

VpnSiteLink

VpnSiteLink 資源。

AddressSpace

Addressspace 包含可供虛擬網路的子網路使用的 IP 位址範圍陣列。

名稱 類型 Description
addressPrefixes

string[]

在 CIDR 表示法中保留給此虛擬網路的位址區塊清單。

BgpSettings

BGP 設定詳細數據。

名稱 類型 Description
asn

integer

BGP 說話者的 ASN。

bgpPeeringAddress

string

這個 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。

bgpPeeringAddresses

IPConfigurationBgpPeeringAddress[]

具有虛擬網路閘道IP組態標識碼的 BGP 對等互連位址。

peerWeight

integer

新增至從這個 BGP 說話者學到之路由的權數。

CloudError

來自服務的錯誤回應。

名稱 類型 Description
error

CloudErrorBody

雲端錯誤本文。

CloudErrorBody

來自服務的錯誤回應。

名稱 類型 Description
code

string

錯誤的識別碼。 程式碼不變,且要以程式設計方式使用。

details

CloudErrorBody[]

錯誤的其他詳細數據清單。

message

string

描述錯誤的訊息,適用於在使用者介面中顯示。

target

string

特定錯誤的目標。 例如,錯誤中屬性的名稱。

DeviceProperties

裝置的屬性清單。

名稱 類型 Description
deviceModel

string

裝置的型號。

deviceVendor

string

裝置廠商的名稱。

linkSpeedInMbps

integer

連結速度。

IPConfigurationBgpPeeringAddress

IPConfigurationBgpPeeringAddress 的屬性。

名稱 類型 Description
customBgpIpAddresses

string[]

屬於IP組態的自訂BGP對等互連位址清單。

defaultBgpIpAddresses

string[]

屬於IP組態的預設 BGP 對等互連位址清單。

ipconfigurationId

string

屬於閘道的IP組態標識碼。

tunnelIpAddresses

string[]

屬於IP組態的通道公用IP位址清單。

O365BreakOutCategoryPolicies

Office365 分項類別。

名稱 類型 Description
allow

boolean

要控制允許類別的旗標。

default

boolean

用來控制預設類別的旗標。

optimize

boolean

用來控制優化類別的旗標。

O365PolicyProperties

Office365 中斷原則。

名稱 類型 Description
breakOutCategories

O365BreakOutCategoryPolicies

Office365 分項類別。

ProvisioningState

目前的布建狀態。

名稱 類型 Description
Deleting

string

Failed

string

Succeeded

string

Updating

string

SubResource

另一個子資源的參考。

名稱 類型 Description
id

string

資源識別碼。

VpnLinkBgpSettings

連結的 BGP 設定詳細數據。

名稱 類型 Description
asn

integer

BGP 說話者的 ASN。

bgpPeeringAddress

string

這個 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。

VpnLinkProviderProperties

連結提供者的屬性清單。

名稱 類型 Description
linkProviderName

string

連結提供者的名稱。

linkSpeedInMbps

integer

連結速度。

VpnSite

VpnSite 資源。

名稱 類型 Description
etag

string

每當更新資源時變更的唯一隻讀字串。

id

string

資源識別碼。

location

string

資源位置。

name

string

資源名稱。

properties.addressSpace

AddressSpace

AddressSpace,其中包含IP位址範圍的數位。

properties.bgpProperties

BgpSettings

bgp 屬性集。

properties.deviceProperties

DeviceProperties

裝置屬性。

properties.ipAddress

string

vpn-site 的IP位址。

properties.isSecuritySite

boolean

IsSecuritySite 旗標。

properties.o365Policy

O365PolicyProperties

Office365 原則。

properties.provisioningState

ProvisioningState

VPN 月臺資源的布建狀態。

properties.siteKey

string

可用於連線的 vpn 月臺金鑰。

properties.virtualWan

SubResource

vpnSite 所屬的 VirtualWAN。

properties.vpnSiteLinks

VpnSiteLink[]

所有 VPN 網站連結的清單。

tags

object

資源標籤。

type

string

資源類型。

VpnSiteLink 資源。

名稱 類型 Description
etag

string

每當更新資源時變更的唯一隻讀字串。

id

string

資源識別碼。

name

string

資源群組內唯一的資源名稱。 此名稱可用來存取資源。

properties.bgpProperties

VpnLinkBgpSettings

bgp 屬性集。

properties.fqdn

string

vpn-site-link 的 FQDN。

properties.ipAddress

string

vpn-site-link 的 IP 位址。

properties.linkProperties

VpnLinkProviderProperties

連結提供者屬性。

properties.provisioningState

ProvisioningState

VPN 網站鏈接資源的布建狀態。

type

string

資源類型。