(POST) /cloud/tenants/{ID}/vCloudComputeResources

Assigns an organization vDC to a vCloud Director tenant account with the specified ID.

Request

To assign an organization vDC to the vCloud Director tenant account, you need to send the POST HTTP request to the URL of the /cloud/tenants/{ID}/vCloudComputeResources resource.

HTTP Request

POST https://<Enterprise-Manager>:9398/api/cloud/tenants/{ID}/vCloudComputeResources

Request Header

The request contains the following headers:

Header

Required

Description

X-RestSvcSessionId

True

The request requires authorization. In the header, the client must send a session ID copied from the server reply to the request creating a new logon session. For details, see Authentication and Security.

Content-Type

True

Identifies the format of the request body message. Possible values:

  • application/xml
  • application/json

Accept

False

Identifies the format of the response. Possible values:

  • application/xml — the client can send this value in the header to accept response in the XML format.
  • application/json — the client must send this value in the header to accept the request in the JSON format.

If the request does not contain the header, the server will return the response in the XML format.

Request Body

In the request body, the client must send parameters of replication resources. The body of the request must conform to the XML Schema Definition of Veeam Backup Enterprise Manager REST API.

The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

VirtualDataCenterRef

URN

Reference to the organization vDC. The reference can be constructed manually or obtained with the lookup service.

Yes

1/1

UseNetworkFailoverResources

Boolean

Defines whether the network extension appliance must be deployed for the vCloud Director tenant account. Possible values:

  • True
  • False

Yes

1/1

NetworkAppliance

NetworkApplianceInfoType

If UseNetworkFailoverResources option is set to True, you can pass parameters for the network extension appliance in the NetworkAppliance section of the request body. For details, see Network Extension Options.

Yes

0/1

WanAcceleratorUid

URN

ID of the WAN accelerator that must be used as a target WAN accelerator. This parameter must be specified if you want tenants to communicate with cloud hosts through WAN accelerators.

Yes

0/1

For example:

XML Representation

<?xml version="1.0" encoding="utf-8"?>
<CloudTenantVCloudComputeResourceCreateSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <VirtualDataCenterRef>urn:vCloud:OrgVdc:e923e20c-e114-4358-90d4-363d7de928f3.urn:vcloud:vdc:c20a16a7-2d09-4374-850d-84b1d6c9f7f3</VirtualDataCenterRef>
   <UseNetworkFailoverResources>true</UseNetworkFailoverResources>
   <WanAcceleratorUid>urn:veeam:WanAccelerator:b14583a5-d617-46e9-8edc-11617db73953</WanAcceleratorUid>
</CloudTenantVCloudComputeResourceCreateSpec>

JSON Representation

{

 "VirtualDataCenterRef": "urn:vCloud:OrgVdc:e923e20c-e114-4358-90d4-363d7de928f3.urn:vcloud:vdc:c20a16a7-2d09-4374-850d-84b1d6c9f7f3",

 "UseNetworkFailoverResources": true,

 "WanAcceleratorUid": "urn:veeam:WanAccelerator:b14583a5-d617-46e9-8edc-11617db73953"

}

Network Extension Options

If you set the UseNetworkFailoverResources option to True, you can specify settings for the network extension appliance that will be deployed for the vCloud Director tenant account in the SP infrastructure. The network extension appliance will act as a gateway between the SP production network and tenant VM replica networks providing resources for cloud VM replica failover.

You must define parameters for the network extension appliance in the NetworkAppliance section of the request body. The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

Name

String

Name for the network extension appliance.

Yes

1/1

ProductionNetwork

String

Network label that identifies the port group to which you want to connect the network extension appliance. The port group is configured on the virtual switch in the SP virtualization environment and provides networking for the Veeam Cloud Connect infrastructure.

Yes

1/1

ObtainIpAddressAutomatically

Boolean

Defines whether network settings must be configured automatically for the network extension appliance. Possible values:

  • True
  • False

If you set this option to False, you must pass network settings for the network extension appliance in the ManualIPAdressSettings section of the request body. For details, see Manual Ip Addressing Options.

Yes

1/1

ViDistributedSwitch

String

ID of the Distributed Virtual Switch on which the port group specified in the ProductionNetwork field is configured.

Yes

0/1

ProductionNetworkUnderDvs

Boolean

Defines whether the port group to which the network extension appliance must be connected is configured on a Distributed Virtual Switch. Possible values:

  • True
  • False

If you set this option to True, you must pass ID of the Distributed Virtual Switch in the ViDistributedSwitch field.

Yes

0/1

For example:

XML Representation

<NetworkAppliance>
 <Name>ApplianceDVS</Name>
 <ProductionNetwork>pd-dvPortGroup-01</ProductionNetwork>
 <ObtainIPAddressAutomatically>true</ObtainIPAddressAutomatically>
 <ViDistributedSwitchUuid>4f 4b 14 50 21 97 3e 66-32 e7 95 50 f0 83 af b3</ViDistributedSwitchUuid>
 <ProductionNetworkUnderDvs>true</ProductionNetworkUnderDvs>
</NetworkAppliance>

JSON Representation

"NetworkAppliance": {

 "Name": "ApplianceDVS",

 "ProductionNetwork": "pd-dvPortGroup-01",

 "ObtainIPAddressAutomatically": "true",

 "ViDistributedSwitchUuid": "4f 4b 14 50 21 97 3e 66-32 e7 95 50 f0 83 af b3",

 "ProductionNetworkUnderDvs": "true"

}

Manual IP Addressing Options

To assign the specific IP address to the network extension appliance, you must pass the following parameters in the ManualIpAddressSettingsInfoType section of the request body:

Element

Type

Description

Modifiable

Min/Max Occurrence

IpAddress

IPv4

IP address for the network extension appliance.

Yes

1/1

SubnetMask

IPv4

Subnet mask for the network extension appliance.

Yes

1/1

DefaultGateway

IPv4

Default gateway for the network extension appliance.

Yes

1/1

For example:

XML Representation

<NetworkAppliance>
 <Name>Appliance</Name>
 <ProductionNetwork>pd-PortGroup-01</ProductionNetwork>
 <ObtainIPAddressAutomatically>false</ObtainIPAddressAutomatically>
 <ManualIpAddressSettingsInfoType>
   <IpAddress>172.17.52.37</IpAddress>
   <SubnetMask>255.255.254.0</SubnetMask>
   <DefaultGateway>172.17.52.1</DefaultGateway>
 </ManualIpAddressSettingsInfoType>
</NetworkAppliance>

JSON Representation

"NetworkAppliance": {

 "Name": "Appliance",

 "ProductionNetwork": "pd-PortGroup-01",

 "ObtainIPAddressAutomatically": "false",

 "ManualIpAddressSettingsInfoType": {

   "IpAddress": "172.17.52.37",

   "SubnetMask": "255.255.254.0",

   "DefaultGateway": "172.17.52.1"

 }

}

Query Parameters

None.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns 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

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the request body message. Possible values:

  • application/xml
  • application/json

Response Body

None.

Example

The example below assigns the organization vDC with ID e923e20c-e114-4358-90d4-363d7de928f3 to the vCloud Director tenant account that has ID b25f5f1d-a3c3-45ed-af23-9ef31a94dac7.

Request:

POST https://localhost:9398/api/cloud/tenants/b25f5f1d-a3c3-45ed-af23-9ef31a94dac7/vCloudComputeResources

 

Request Headers:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj
Content-Type         application/xml

 

Request Body:

<?xml version="1.0" encoding="utf-8"?>
<CloudTenantVCloudComputeResourceCreateSpec xmlns="http://www.veeam.com/ent/v1.0">
   <VirtualDataCenterRef>urn:vCloud:OrgVdc:e923e20c-e114-4358-90d4-363d7de928f3.urn:vcloud:vdc:c20a16a7-2d09-4374-850d-84b1d6c9f7f3</VirtualDataCenterRef>
   <UseNetworkFailoverResources>false</UseNetworkFailoverResources>
</CloudTenantVCloudComputeResourceCreateSpec>

 

Response:

202 Accepted

 

Response Body:

<Task Href="http://restapiem.tech.local:9399/api/tasks/task-1" Type="Task" xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <Links>
   <Link Href="http://restapiem.local:9399/api/tasks/task-1" Rel="Delete"/>
 </Links>
 <TaskId>task-1</TaskId>
 <State>Running</State>
 <Operation>CreateCloudTenantVCloudComputeResource</Operation>
</Task>

To trace the status of the operation, send the GET HTTP request to the URL of the received task resource:

Request:

GET https://localhost:9398/api/tasks/task-1

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Response:

200 OK

 

Response Body:

<Task Href="http://restapiem.local:9399/api/tasks/task-1" Type="Task" xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <Links>
   <Link Href="http://restapiem.local:9399/api/tasks/task-1" Rel="Delete"/>
 </Links>
 <TaskId>task-427</TaskId>
 <State>Finished</State>
 <Operation>CreateCloudTenantVCloudComputeResource</Operation>
 <Result Success="true">
   <Message>Ok</Message>
 </Result>
</Task>

I want to report a typo

There is a misspelling right here:

 

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