This is an archive version of the document. To get the most up-to-date information, see the current version.

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

On This Page

Subscribes a tenant account with the specified ID to the hardware plan.

Request

To subscribe the tenant to the hardware plan, you need to send the POST HTTP request to the URL of the /cloud/tenants/{ID}/computeResources resource.

HTTP Request

POST http://<Enterprise-Manager>:9399/api/cloud/tenants/{ID}/computeResources

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. To learn more, see Authentication and Security.

Request Body

In the request body, the client must send parameters of the hardware plan. The body of the request must conform to the XML Schema Definition of Veeam Backup Enterprise Manager RESTful API.

The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

CloudHardwarePlanUid

String

ID of the hardware plan to which the tenant account must be subscribed.

Yes

1/1

WanAcceleratorUid

URN

ID of the WAN accelerator that must be used as a target WAN accelerator with the cloud host presented by the hardware plan. This parameter must be specified if you want tenants to work with cloud hosts via WAN accelerators.

Yes

0/1

PlatformType

String

Platform for which the hardware plan to which the tenant account is subscribed has been created. Possible values:

  • VMware
  • HyperV

Yes

1/1

UseNetworkFailoverResources

Boolean

Defines whether the network extension appliance must be deployed for the tenant account subscribed to the hardware plan.

Yes

1/1

For example:

<?xml version="1.0" encoding="utf-8"?>
<CloudTenantComputeResourceCreateSpec 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">
<CloudHardwarePlanUid>urn:veeam:CloudHardwarePlan:91156f8d-8bd3-44af-bec3-b6ac2ea24288</CloudHardwarePlanUid>
 <WanAcceleratorUid>urn:veeam:WanAccelerator:34ebeeb4-75d0-4e71-b315-fbc16eb2975f</WanAcceleratorUid>
 <PlatformType>VMware</PlatformType>
 <UseNetworkFailoverResources>true</UseNetworkFailoverResources>
</CloudTenantComputeResourceCreateSpec>

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: application/xml.

Response Body

None.

Example

The example below subscribes the tenant account that has ID b25f5f1d-a3c3-45ed-af23-9ef31a94dac7 to the VMware hardware plan that has ID 91156f8d-8bd3-44af-bec3-b6ac2ea24288.

Request:

POST http://localhost:9399/api/cloud/tenants/b25f5f1d-a3c3-45ed-af23-9ef31a94dac7/computeResources

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Request Body:

<?xml version="1.0" encoding="utf-8"?>
<CloudTenantComputeResourceCreateSpec 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">
<CloudHardwarePlanUid>urn:veeam:CloudHardwarePlan:91156f8d-8bd3-44af-bec3-b6ac2ea24288</CloudHardwarePlanUid>
 <PlatformType>VMware</PlatformType>
 <UseNetworkFailoverResources>true</UseNetworkFailoverResources>
</CloudTenantComputeResourceCreateSpec>

 

Response:

202 Accepted

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Running</State>
 <Operation>CreateCloudTenantResource</Operation>
</Task>

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

Request:

GET http://localhost:9399/api/tasks/task-1

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Response:

200 Success

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Finished</State>
 <Operation>CreateCloudTenantResource</Operation>
 <Result Success="true">
   <Message>Ok</Message>
 </Result>
</Task>