POST /cloud/hardwarePlans
Configures a new hardware plan on the backup server connected to Veeam Backup Enterprise Manager.
Request
To create a new hardware plan, send the POST HTTP request to the URL of the /cloud/hardwarePlans resource.
HTTP Request
POST https://<Enterprise-Manager>:9398/api/cloud/hardwarePlans |
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:
|
Accept | False | Identifies the format of the response. Possible values:
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 for the new hardware plan. The body of the request must conform to the XML Schema Definition of Veeam Backup Enterprise Manager REST API.
Important |
If you use the XML media type, make sure that the order of parameters in the request body is correct. For details, see request body examples in this section. |
The request body must contain the following elements:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
BackupServerUid | String | UID of the backup server on which the hardware plan must be created. | Yes | 1/1 |
Name | String | Name for the hardware plan, for example: VMware Hardware Plan. | Yes | 1/1 |
Description | String | Description for the hardware plan. | Yes | 0/1 |
ProcessorUsageLimitMhz | Int | Limit of CPU that can be used by all VM replicas of the tenant subscribed to the hardware plan. To let the replicas use all available CPU resources, set the value to -1. | Yes | 1/1 |
MemoryUsageLimitMb | Int | Limit of RAM that can be used by all VM replicas of the tenant subscribed to the hardware plan. To let the replicas use all available RAM resources, set the value to -1. | Yes | 1/1 |
HardwarePlanDetails | ViCloudHardwarePlan or HvCloudHardwarePlan | Parameters for the created hardware plan. For details on creating a VMware hardware plan, see VMware Hardware Plan Settings. For details on creating a Hyper-V hardware plan, see Hyper-V Hardware Plan Settings. | Yes | 1/1 |
For example:
XML Representation
<?xml version="1.0" encoding="utf-8"?> |
JSON Representation
{ "BackupServerUid": "urn:veeam:BackupServer:8fff3b8e-c3f1-4ef5-aecc-561f07bf9982", "Name": "VMware Gold", "Description": "Hardware Plan for VMware", "ProcessorUsageLimitMhz": 10000, "MemoryUsageLimitMb": 20000, "HardwarePlanDetails": { "ViCloudHardwarePlan": { "HypervisorHostRef": "urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438", "ParentType": "HostSystem", "ParentName": "esx01.tech.local", "Datastores": { "Datastores": [ { "FriendlyName": "Cloud Replicas", "DatastoreType": "Datastore", "Reference": "urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441", "QuotaGb": 500 } ] }, "Network": { "CountWithInternet": 1, "CountWithoutInternet": 0 } } } } |
You can define the following parameters for the VMware hardware plan:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
HypervisorHostRef | HierarchyObjRefType | Reference to the virtualization host on which tenant VM replicas should be registered, for example: urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438. | Yes | 1/1 |
ParentType | String | Type of the VMware object. Possible values:
| Yes | 1/1 |
ParentName | String | Name of the host or cluster. | Yes | 1/1 |
Datastores | ViCloudHardwarePlanDatastoreInfoListType | Datastore parameters for the created hardware plan. For details, see Datastore Settings. | Yes | 1/1 |
Network | CloudHardwarePlanNetworkInfo | Network parameters for the created hardware plan. For details, see Network Settings. | Yes | 0/1 |
Note |
VMware hardware plan settings must be defined in the ViCloudHardwarePlan section of the request body. |
For example:
XML Representation
<ViCloudHardwarePlan> |
JSON Representation
"ViCloudHardwarePlan": { "HypervisorHostRef": "urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438", "ParentType": "HostSystem", "ParentName": "esx01.tech.local", "Datastores": { "Datastores": [ { "FriendlyName": "Cloud Replicas", "DatastoreType": "Datastore", "Reference": "urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441", "QuotaGb": 500 } ] }, "Network": { "CountWithInternet": 1, "CountWithoutInternet": 0 } } |
You can define the following datastore parameters for the VMware hardware plan:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
FriendlyName | String | Name of the datastore as displayed to the tenant, for example: Cloud Replicas. | Yes | 1/1 |
DatastoreType | String | Type of the datastore. Possible values:
| Yes | 1/1 |
Reference | HierarchyObjRefType | Reference to the datastore on which tenant VM replicas should be stored, for example: urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441. You can construct the reference manually or use the lookup service to retrieve the reference. | Yes | 1/1 |
QuotaGb | Int | Storage quota for tenant VM replicas on the datastore (in GB). | Yes | 1/1 |
For example:
XML Representation
<Datastores> |
JSON Representation
"Datastores": { "Datastores": [ { "FriendlyName": "Cloud Replicas", "DatastoreType": "Datastore", "Reference": "urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441", "QuotaGb": 500 } ] } |
Hyper-V Hardware Plan Settings
You can define the following parameters for the for the Hyper-V hardware plan:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
HypervisorHostRef | HierarchyObjRefType | Reference to the virtualization host on which tenant VM replicas should be registered, for example: urn:HyperV:Host:849a937a-3416-4f03-8111-67b06393afcb. You can construct the reference manually or use the lookup service to retrieve the reference. | Yes | 1/1 |
Volumes | HvCloudHardwarePlanVolumesInfoListType | Storage volume parameters for the created hardware plan. For details, see Volume Settings. | Yes | 1/1 |
Network | CloudHardwarePlanNetworkInfo | Network parameters for the created hardware plan. For details, see Network Settings. | Yes | 0/1 |
Note |
Hyper-V hardware plan settings must be defined in the HvCloudHardwarePlan section of the request body. |
For example:
XML Representation
<HvCloudHardwarePlan> |
JSON Representation
"HvCloudHardwarePlan": { "HypervisorHostRef": "urn:HyperV:Host:849a937a-3416-4f03-8111-67b06393afcb.", "Volumes": { "Volumes": [ { "FriendlyName": "Cloud Replicas", "VolumePath": "D:\\Replicas", "QuotaGb": 300 } ] }, "Network": { "CountWithInternet": 1, "CountWithoutInternet": 1 } } |
You can define the following storage volume parameters for the Hyper-V hardware plan:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
FriendlyName | String | Name of the volume as displayed to the tenant, for example: Cloud Replicas. | Yes | 1/1 |
VolumePath | String | Path to a folder on the volume in which tenant VM replica files should be stored. | Yes | 1/1 |
QuotaGb | Int | Storage quota for tenant VM replicas on the volume (in GB). | Yes | 1/1 |
For example:
XML Representation
<Volumes> |
JSON Representation
"Volumes": { "Volumes": [ { "FriendlyName": "Cloud Replicas", "VolumePath": "D:\\Replicas", "QuotaGb": 300 } ] } |
You can define the following network parameters for the VMware or Hyper-V hardware plan:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
CountWithInternet | Int | Number of networks with internet access that will be available to tenant VM replicas. | Yes | 0/1 |
CountWithoutInternet | Int | Number of networks without internet access that will be available to tenant VM replicas. | Yes | 0/1 |
For example:
XML Representation
<Network> |
JSON Representation
"Network": { "CountWithInternet": 1, "CountWithoutInternet": 1 } |
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:
|
Response Body
In the response body, the REST API returns a task that has been created to perform the requested operation. To track the status of the operation, send the GET /tasks/{ID} request.
The task resource also contains a link to the task deletion operation. To stop the task execution, send the DELETE /task/{ID} request to the URL in the link.
Example
The example below creates a VMware hardware plan on the backup server with ID 8fff3b8e-c3f1-4ef5-aecc-561f07bf9982.
Request: POST https://localhost:9398/api/cloud/hardwarePlans
Request Headers: X-RestSvcSessionId NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj
Request Body: <?xml version="1.0" encoding="utf-8"?>
Response: 202 Accepted
Response Body: <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="https://localhost:9398/api/tasks/task-1"> |
To track 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 xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="https://localhost:9398/api/tasks/task-1"> |