Vpn Sites - Create Or Update

Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite.

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

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The resource group name of the VpnSite.

subscriptionId
path True

string

The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

vpnSiteName
path True

string

The name of the VpnSite being created or updated.

api-version
query True

string

Client API version.

Request Body

Name Required Type Description
location True

string

Resource location.

id

string

Resource ID.

properties.addressSpace

AddressSpace

The AddressSpace that contains an array of IP address ranges.

properties.bgpProperties

BgpSettings

The set of bgp properties.

properties.deviceProperties

DeviceProperties

The device properties.

properties.ipAddress

string

The ip-address for the vpn-site.

properties.isSecuritySite

boolean

IsSecuritySite flag.

properties.o365Policy

O365PolicyProperties

Office365 Policy.

properties.siteKey

string

The key for vpn-site that can be used for connections.

properties.virtualWan

SubResource

The VirtualWAN to which the vpnSite belongs.

properties.vpnSiteLinks

VpnSiteLink[]

List of all vpn site links.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

VpnSite

Request successful. Returns the details of the VpnSite created or updated.

201 Created

VpnSite

Request received successfully. Returns the details of the VpnSite created or updated.

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

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

Scopes

Name Description
user_impersonation impersonate your user account

Examples

VpnSiteCreate

Sample request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1?api-version=2024-03-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
          }
        }
      }
    ]
  }
}

Definitions

Name Description
AddressSpace

AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network.

BgpSettings

BGP settings details.

CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

DeviceProperties

List of properties of the device.

IPConfigurationBgpPeeringAddress

Properties of IPConfigurationBgpPeeringAddress.

O365BreakOutCategoryPolicies

Office365 breakout categories.

O365PolicyProperties

The Office365 breakout policy.

ProvisioningState

The current provisioning state.

SubResource

Reference to another subresource.

VpnLinkBgpSettings

BGP settings details for a link.

VpnLinkProviderProperties

List of properties of a link provider.

VpnSite

VpnSite Resource.

VpnSiteLink

VpnSiteLink Resource.

AddressSpace

AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network.

Name Type Description
addressPrefixes

string[]

A list of address blocks reserved for this virtual network in CIDR notation.

BgpSettings

BGP settings details.

Name Type Description
asn

integer

The BGP speaker's ASN.

bgpPeeringAddress

string

The BGP peering address and BGP identifier of this BGP speaker.

bgpPeeringAddresses

IPConfigurationBgpPeeringAddress[]

BGP peering address with IP configuration ID for virtual network gateway.

peerWeight

integer

The weight added to routes learned from this BGP speaker.

CloudError

An error response from the service.

Name Type Description
error

CloudErrorBody

Cloud error body.

CloudErrorBody

An error response from the service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

DeviceProperties

List of properties of the device.

Name Type Description
deviceModel

string

Model of the device.

deviceVendor

string

Name of the device Vendor.

linkSpeedInMbps

integer

Link speed.

IPConfigurationBgpPeeringAddress

Properties of IPConfigurationBgpPeeringAddress.

Name Type Description
customBgpIpAddresses

string[]

The list of custom BGP peering addresses which belong to IP configuration.

defaultBgpIpAddresses

string[]

The list of default BGP peering addresses which belong to IP configuration.

ipconfigurationId

string

The ID of IP configuration which belongs to gateway.

tunnelIpAddresses

string[]

The list of tunnel public IP addresses which belong to IP configuration.

O365BreakOutCategoryPolicies

Office365 breakout categories.

Name Type Description
allow

boolean

Flag to control allow category.

default

boolean

Flag to control default category.

optimize

boolean

Flag to control optimize category.

O365PolicyProperties

The Office365 breakout policy.

Name Type Description
breakOutCategories

O365BreakOutCategoryPolicies

Office365 breakout categories.

ProvisioningState

The current provisioning state.

Name Type Description
Deleting

string

Failed

string

Succeeded

string

Updating

string

SubResource

Reference to another subresource.

Name Type Description
id

string

Resource ID.

VpnLinkBgpSettings

BGP settings details for a link.

Name Type Description
asn

integer

The BGP speaker's ASN.

bgpPeeringAddress

string

The BGP peering address and BGP identifier of this BGP speaker.

VpnLinkProviderProperties

List of properties of a link provider.

Name Type Description
linkProviderName

string

Name of the link provider.

linkSpeedInMbps

integer

Link speed.

VpnSite

VpnSite Resource.

Name Type Description
etag

string

A unique read-only string that changes whenever the resource is updated.

id

string

Resource ID.

location

string

Resource location.

name

string

Resource name.

properties.addressSpace

AddressSpace

The AddressSpace that contains an array of IP address ranges.

properties.bgpProperties

BgpSettings

The set of bgp properties.

properties.deviceProperties

DeviceProperties

The device properties.

properties.ipAddress

string

The ip-address for the vpn-site.

properties.isSecuritySite

boolean

IsSecuritySite flag.

properties.o365Policy

O365PolicyProperties

Office365 Policy.

properties.provisioningState

ProvisioningState

The provisioning state of the VPN site resource.

properties.siteKey

string

The key for vpn-site that can be used for connections.

properties.virtualWan

SubResource

The VirtualWAN to which the vpnSite belongs.

properties.vpnSiteLinks

VpnSiteLink[]

List of all vpn site links.

tags

object

Resource tags.

type

string

Resource type.

VpnSiteLink Resource.

Name Type Description
etag

string

A unique read-only string that changes whenever the resource is updated.

id

string

Resource ID.

name

string

The name of the resource that is unique within a resource group. This name can be used to access the resource.

properties.bgpProperties

VpnLinkBgpSettings

The set of bgp properties.

properties.fqdn

string

FQDN of vpn-site-link.

properties.ipAddress

string

The ip-address for the vpn-site-link.

properties.linkProperties

VpnLinkProviderProperties

The link provider properties.

properties.provisioningState

ProvisioningState

The provisioning state of the VPN site link resource.

type

string

Resource type.