Calculate Estimated Cost of Backup Policy

You can calculate the estimated monthly cost for protecting Azure resources.

Request

To calculate the estimated cost of protected Azure resources, send the HTTP POST request to the /costEstimation endpoint.

HTTP Request

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

Query Parameters

To control the amount and order of data in the response, you can use Offset, Limit and the following query parameters:

Query Parameter

Value

Description

VirtualMachineNameFilter

string

Returns only estimated cost of protecting an Azure VM with the specified name. For more information, see Filter Parameters.

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 calculate the estimated monthly cost for the protected Azure resources, send the parameters of the CostEstimationPolicyFromClientV2 schema in the request body.

Set the parameter value in the following format:

{

 "priority": 0,

 "tenantId": "string",

 "regions": [

   {

     "regionId": "string"

   }

 ],

 "selectedItems": {

   "subscriptions": [

     {

       "subscriptionId": "string"

     }

   ],

   "tags": [

     {

       "name": "string",

       "value": "string"

     }

   ],

   "resourceGroups": [

     {

       "id": "string"

     }

   ],

   "virtualMachines": [

     {

       "id": "string"

     }

   ]

 },

 "excludedItems": {

   "virtualMachines": [

     {

       "id": "string"

     }

   ]

 },

 "name": "string",

 "description": "string",

 "retrySettings": {

   "retryCount": 0

 },

 "policyNotificationSettings": {

   "recipient": "admin@tech.local",

   "notifyOnSuccess": true,

   "notifyOnWarning": true,

   "notifyOnFailure": true

 },

 "isEnabled": true,

 "backupType": "AllSubscriptions",

 "snapshotSettings": {

   "additionalTags": [

     {

       "name": "string",

       "value": "string"

     }

   ],

   "copyOriginalTags": true,

   "applicationAwareSnapshot": true,

   "userScripts": {

     "windows": {

       "scriptsEnabled": true,

       "preScriptPath": "string",

       "preScriptArguments": "string",

       "postScriptPath": "string",

       "postScriptArguments": "string",

       "repositorySnapshotsOnly": true,

       "ignoreExitCodes": true,

       "ignoreMissingScripts": true

     },

     "linux": {

       "scriptsEnabled": true,

       "preScriptPath": "string",

       "preScriptArguments": "string",

       "postScriptPath": "string",

       "postScriptArguments": "string",

       "repositorySnapshotsOnly": true,

       "ignoreExitCodes": true,

       "ignoreMissingScripts": true

     }

   }

 },

 "dailySchedule": {

   "dailyType": "Everyday",

   "selectedDays": [

     "Sunday"

   ],

   "runsPerHour": 0,

   "snapshotSchedule": {

     "hours": [

       0

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "hours": [

       0

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "string"

   }

 },

 "weeklySchedule": {

   "startTime": 0,

   "snapshotSchedule": {

     "selectedDays": [

       "Sunday"

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "selectedDays": [

       "Sunday"

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "string"

   }

 },

 "monthlySchedule": {

   "startTime": 0,

   "type": "First",

   "dayOfWeek": "Sunday",

   "dayOfMonth": 0,

   "monthlyLastDay": true,

   "snapshotSchedule": {

     "selectedMonths": [

       "January"

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "selectedMonths": [

       "January"

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "string"

   }

 },

 "yearlySchedule": {

   "startTime": 0,

   "month": "January",

   "type": "First",

   "dayOfWeek": "Sunday",

   "dayOfMonth": 0,

   "yearlyLastDay": true,

   "retentionYearsCount": 0,

   "targetRepositoryId": "string"

 }

}

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 200 (OK).

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 estimated monthly cost of the backup policy with the specified settings. The CostEstimationsPage schema is used for the resource representation.

Calculate Estimated Cost of Backup PolicyExample

The following request calculates estimated monthly cost for a backup policy with the following settings.

Request:

POST https://51.11.247.127/api/v2/costEstimation

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

 "priority": 1,

 "tenantId": "3e924ba9-93bc-40d5-8a47-33f07b239a52",

 "regions": [

     {

        "regionId":"northeurope"

     },

     {

        "regionId":"ukwest"

     },

     {

        "regionId":"westeurope"

     }

 ],

 "selectedItems": {

   "subscriptions": [],

   "tags": [],

   "resourceGroups": [],

   "virtualMachines": [

     {

           "id":"ej43ifg58cgjs8e9cod74ye6cbwm5nttf6ijzk64rshqoip1abqy"

        },

        {

           "id":"g344t5o8hgxgyp9r5bxqsn1aom88kjsc3hjnk3o8umzdptc3w3ey"

        }

   ]

 },

 "excludedItems": {

   "virtualMachines": []

 },

 "name": "backup policy-01",

 "description": "created by Default Admin",

 "retrySettings": {

   "retryCount": 6

 },

 "policyNotificationSettings": {

   "recipient": "adminc@tech.local",

   "notifyOnSuccess": true,

   "notifyOnWarning": true,

   "notifyOnFailure": true

 },

 "isEnabled": true,

 "backupType": "AllSubscriptions",

 "snapshotSettings": {

   "additionalTags": [

     {

       "name": "dept-01",

       "value": "Department1"

     }

   ],

   "copyOriginalTags": true,

   "applicationAwareSnapshot": false,

   "userScripts": {

     "windows": {

       "scriptsEnabled": false,

       "preScriptPath": "",

       "preScriptArguments": "",

       "postScriptPath": "",

       "postScriptArguments": "",

       "repositorySnapshotsOnly": ,

       "ignoreExitCodes": ,

       "ignoreMissingScripts":

     },

     "linux": {

       "scriptsEnabled": false,

       "preScriptPath": "",

       "preScriptArguments": "",

       "postScriptPath": "",

       "postScriptArguments": "",

       "repositorySnapshotsOnly": ,

       "ignoreExitCodes": true,

       "ignoreMissingScripts":

     }

   }

 },

 "dailySchedule": {

   "dailyType": "Everyday",

   "selectedDays": [

     "Sunday"

   ],

   "runsPerHour": 1,

   "snapshotSchedule": {

     "hours": [

       20:00:00

     ],

     "snapshotsToKeep": 7

   },

   "backupSchedule": {

     "hours": [

       20:00:00

     ],

     "retention": {

       "timeRetentionDuration": 2,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "14"

   }

 },

 "weeklySchedule": {

   "startTime": 0,

   "snapshotSchedule": {

     "selectedDays": [

       "Sunday"

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "selectedDays": [

       "Sunday"

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "14"

   }

 },

 "monthlySchedule": {

   "startTime": 20:00:00,

   "type": "First",

   "dayOfWeek": "Sunday",

   "dayOfMonth": 1,

   "monthlyLastDay": true,

   "snapshotSchedule": {

     "selectedMonths": [

       "January"

     ],

     "snapshotsToKeep": 0

   },

   "backupSchedule": {

     "selectedMonths": [

       "January"

     ],

     "retention": {

       "timeRetentionDuration": 0,

       "retentionDurationType": "Days"

     },

     "targetRepositoryId": "14"

   }

 },

 "yearlySchedule": {

   "startTime": 0,

   "month": "January",

   "type": "First",

   "dayOfWeek": "Sunday",

   "dayOfMonth": 0,

   "yearlyLastDay": true,

   "retentionYearsCount": 0,

   "targetRepositoryId": "string"

 }

}

 

Response:

200

 

Response Body:

{

 "metadata": {

   "totals": {

     "totalCosts": {

       "pricePerMonth": {

         "value": 133.15584213161907,

         "type": "Valid"

       },

       "warnings": []

     },

     "totalSnapshotCosts": {

       "pricePerMonth": {

         "value": 14.700000000000001,

         "type": "Valid"

       },

       "warnings": []

     },

     "totalBackupCosts": {

       "pricePerMonth": {

         "value": 2.3619445218835025,

         "type": "Valid"

       },

       "warnings": []

     },

     "totalTrafficCosts": {

       "pricePerMonth": {

         "value": 115.40550232315063,

         "type": "Valid"

       },

       "warnings": []

     },

     "totalTransactionCosts": {

       "pricePerMonth": {

         "value": 0.6883952865849224,

         "type": "Valid"

       },

       "warnings": []

     }

   },

   "assumptions": {

     "diskOccupiedSizeRatio": 0.7,

     "dailyChurnRatio": 0.03,

     "dataCompressionRatio": 2

   },

   "warningGroups": [

     {

       "type": "StorageCouldBeCheaper",

       "text": "There are more cost-effective storage account alternatives than Standard_RAGRS, for example Standard_LRS.",

       "warnings": [

         {

           "id": "StorageCouldBeCheaper_7201feeca16d2c15e8a0b0cce8f43a2a",

           "protectedItemHashIds": [],

           "schedules": [

             "Daily"

           ],

           "text": "There are more cost-effective storage account alternatives than Standard_RAGRS, for example Standard_LRS."

         }

       ]

     }

   ],

   "currencyIsoCode": "USD"

 },

 "offset": 0,

 "limit": 30,

 "totalCount": 2,

 "results": [

   {

     "protectedItemHashId": "1bds4myhyh4o66wzxk6ixcgp1xssgmwyhremj1su6ixj6p4snrny",

     "name": "rep-vm1",

     "snapshotCost": {

       "pricePerMonth": {

         "value": 7.3500000000000005,

         "type": "Valid"

       },

       "meters": [

         {

           "resource": {

             "name": "rep-vm1_disk1_94bce520eee044358e842ad7d36c025d",

             "hashId": "duprymsckjawm1zxi1oatpmrinqqom3wamxm7gr7kto9h7xjn54y",

             "resourceId": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/-resourcegroup/providers/microsoft.compute/disks/-server_disk1_94bce520eee044358e842ad7d36c025d",

             "size": 30

           },

           "meterId": "5590d778-a6e7-40ec-bc83-c1440ed75c75",

           "description": "LrsSnapshots/StandardHddManagedDisks",

           "unitPrice": 0.05,

           "unit": "OneGb",

           "quantityUsed": 147

         }

       ],

       "warnings": []

     },

     "backupCost": {

       "pricePerMonth": {

         "value": 1.1809722609417512,

         "type": "Valid"

       },

       "meters": [

         {

           "resource": {

             "name": "rep-vm2",

             "hashId": "rep-vm2_disk1_94bce520eee044358e842ad7d36c025d",

             "resourceId": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/-resourcegroup/providers/microsoft.compute/disks/rep-vm2_disk1_94bce520eee044358e842ad7d36c025d",

             "size": 30

           },

           "meterId": "0623400b-f198-453e-b090-f09555b18e6a",

           "description": "Data Stored",

           "unitPrice": 0.049,

           "unit": "OneGbPerMonth",

           "quantityUsed": 17.11554001364857

              },

       ],

       "warnings": []

     },

     "trafficCost": {

       "pricePerMonth": {

         "value": 57.702751161575314,

         "type": "Valid"

       },

       "meters": [

         {

           "resource": {

             "name": "-server_disk1_94bce520eee044358e842ad7d36c025d",

             "hashId": "duprymsckjawm1zxi1oatpmrinqqom3wamxm7gr7kto9h7xjn54y",

             "resourceId": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/-resourcegroup/providers/microsoft.compute/disks/-server_disk1_94bce520eee044358e842ad7d36c025d",

             "size": 30

           },

           "meterId": "9995d93a-7d35-4d3f-9c69-7a7fea447ef4",

           "description": "Zone1/DataTransferOut",

           "unitPrice": 0.087,

           "unit": "OneGb",

           "quantityUsed": 663.2500133514404

         }

       ],

       "warnings": []

     },

     "transactionCost": {

       "pricePerMonth": {

         "value": 0.3441976432924612,

         "type": "Valid"

       },

       "meters": [

         {

           "resource": {

             "name": "-server_disk1_94bce520eee044358e842ad7d36c025d",

             "hashId": "duprymsckjawm1zxi1oatpmrinqqom3wamxm7gr7kto9h7xjn54y",

             "resourceId": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/-resourcegroup/providers/microsoft.compute/disks/-server_disk1_94bce520eee044358e842ad7d36c025d",

             "size": 30

           },

           "meterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",

           "description": "Write Operations",

           "unitPrice": 0.108,

           "unit": "OneGb",

           "quantityUsed": 3.125057311304348

         }

       ],

       "warnings": []

     },

     "totalPerMonth": {

       "pricePerMonth": {

         "value": 6.57792106580953,

         "type": "Valid"

       },

       "warnings": []

     },

     "warnings": []

   }

 ],

 "_links": {}

}

I want to report a typo

There is a misspelling right here:

 

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