Add Virtual Network

You can a virtual network to Veeam Backup for Microsoft Azure.

Request

To add a virtual network, send the HTTP POST request to the/virtualNetworks endpoint.

HTTP Request

POST https://<hostname>/api/v2/virtualNetworks

Request Headers

The request contains the following headers.

Header

Required

Value

Description

Authorization

Required

Bearer <Access-Token>

Authenticates a client who sends the request to the server. Must contain the access token for the current logon session in the Bearer <Access-Token> format.

Request Body

To add a new virtual network, send the following parameters in the request body.

Parameter

Type

Description

networkName

string

Name of the virtual network.

region

string

Specifies a system ID assigned to an Azure region in the Veeam Backup for Microsoft Azure REST API.

networkAddressSpace

string

IP address range of the created virtual network.

subnetName

string

Specifies the subnet name.

subnetAddressSpace

string

IP address range of the created subnetwork.

Set the parameter values in the following format:

{

 "networkName": "string",

 "region": "string",

 "networkAddressSpace": "string",

 "subnetName": "string",

 "subnetAddressSpace": "string"

}

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 202 (Accepted).

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTP headers.

Header

Value

Description

Content-length

integer

Identifies the length of the response body message, in bytes.

Content-type

  • application/json
  • application/problem+json

Identifies the media type of the response body message.

Response Body

In the response body, Veeam Backup for Microsoft Azure returns a representation of the added virtual network. The VirtualNetworkV2 schema is used for the resource representation.

Add Virtual NetworkExample

The following request adds a new virtual network.

Request:

POST https://51.11.247.127/api/v2/cloudInfrastructure/virtualNetworks

 

Request Header:

Authorization: Bearer <Access-Token>

Content-Type: application/json

 

Request Body:

{

 "networkName": "TW_Virtual_Network",

 "region": "ukwest",

 "networkAddressSpace": "10.76.0.0/16",

 "subnetName": "TW_Virtual_Network_sub",

 "subnetAddressSpace": "10.76.0.0/24",

 "createPeering": true

}

 

Response:

202

 

Response Body:

{

  "id": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/jenkins-abc/providers/microsoft.network/virtualnetworks/tw_virtual_network",

  "name": "TW_Virtual_Network",

  "regionName": "ukwest",

  "addressSpaces": ["10.76.0.0/16"],

  "_links":    {

     "subscription": {"href": "https://51.11.247.127/api/v2/cloudInfrastructure/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809"},

     "self": {"href": "https://51.11.247.127/api/v2/cloudInfrastructure/virtualNetworks/%2Fsubscriptions%2F3a9a8330-7bbc-4b03-9c68-15d674fbc809%2Fresourcegroups%2Fjenkins-abc%2Fproviders%2Fmicrosoft.network%2Fvirtualnetworks%2Ftw_virtual_network?expand=Subnets&expand=Peerings"}

  },

     }]

  }

}

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.