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

Calculate Estimated Cost of Backup Policy

You can calculate the estimated monthly cost for a backup policy with specific settings.

Request

To calculate the estimated cost of a backup policy, send the HTTP POST request to the /costEstimation endpoint.

HTTP Request

POST https://<hostname>:<port>/api/v1/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

Sort

  • virtualMachineNameAsc
  • virtualMachineNameDesc
  • snapshotCostAsc
  • snapshotCostDesc
  • replicaCostAsc
  • replicaCostDesc
  • backupCostAsc
  • backupCostDesc
  • trafficAsc
  • trafficDesc
  • transactionAsc
  • transactionDesc
  • totalAsc
  • totalDesc

Specifies the order of items in the response. For more information, see Sort Parameter.

VirtualMachineNameFilter

string

Returns only estimated cost of backing up an EC2 instance with the specified name. For more information, see Filter Parameters.

Request Headers

The request contains the following headers.

Header

Required/Optional

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.

x-api-version

Required

1.0-rev0

Specifies the current revision of the Veeam Backup for AWS REST API.

Content-Type

Required

application/json

Identifies a media type that is used in the body of the request.

Accept

Optional

  • application/json
  • application/problem+json

Specifies a media type of representation that is required in the response message. If the requested type is not supported, the server will return the response in the application/json media type.

Request Body

To calculate the estimated monthly cost for the backup policy, send the policy settings in the request body. Use the PolicySpec schema.

Set the parameter value in the following format:

{

 "snapshotSettings": {

   "additionalTags": [

     {

       "key": "string",

       "value": "string"

     }

   ],

   "copyTagsFromVolumeEnabled": true,

   "tryCreateVSSSnapshot": true

 },

 "replicaSettings": {

   "mapping": [

     {

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

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

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

       "encryptionKey": "string"

     }

   ],

   "additionalTags": [

     {

       "key": "string",

       "value": "string"

     }

   ],

   "copyTagsFromVolumeEnabled": true

 },

 "backupSettings": {

   "targetRepositoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"

 },

 "regionIds": [

   "3fa85f64-5717-4562-b3fc-2c963f66afa6"

 ],

 "selectedItems": {

   "virtualMachineIds": [

     "3fa85f64-5717-4562-b3fc-2c963f66afa6"

   ],

   "tagIds": [

     "3fa85f64-5717-4562-b3fc-2c963f66afa6"

   ]

 },

 "excludedItems": {

   "virtualMachineIds": [

     "3fa85f64-5717-4562-b3fc-2c963f66afa6"

   ],

   "tagIds": [

     "3fa85f64-5717-4562-b3fc-2c963f66afa6"

   ]

 },

 "scheduleSettings": {

   "dailyScheduleEnabled": true,

   "dailySchedule": {

     "kind": "Everyday",

     "runsPerHour": 0,

     "days": [

       "Sunday"

     ],

     "snapshotOptions": {

       "retention": {

         "count": 0

       },

       "schedule": {

         "hours": [

           true

         ]

       }

     },

     "backupOptions": {

       "retention": {

         "type": "Days",

         "count": 0

       },

       "schedule": {

         "hours": [

           true

         ]

       }

     },

     "replicaOptions": {

       "retention": {

         "count": 0

       },

       "schedule": {

         "hours": [

           true

         ]

       }

     }

   },

   "weeklyScheduleEnabled": true,

   "weeklySchedule": {

     "timeLocal": "2020-05-29T10:12:06.530Z",

     "snapshotOptions": {

       "retention": {

         "count": 0

       },

       "schedule": {

         "days": [

           "Sunday"

         ]

       }

     },

     "backupOptions": {

       "retention": {

         "type": "Days",

         "count": 0

       },

       "schedule": {

         "days": [

           "Sunday"

         ]

       }

     },

     "replicaOptions": {

       "retention": {

         "count": 0

       },

       "schedule": {

         "days": [

           "Sunday"

         ]

       }

     }

   },

   "monthlyScheduleEnabled": true,

   "monthlySchedule": {

     "timeLocal": "2020-05-29T10:12:06.530Z",

     "dayNumberInMonth": "First",

     "dayOfWeek": "Sunday",

     "dayOfMonth": 0,

     "snapshotOptions": {

       "retention": {

         "count": 0

       },

       "schedule": {

         "months": [

           "January"

         ]

       }

     },

     "backupOptions": {

       "retention": {

         "type": "Days",

         "count": 0

       },

       "schedule": {

         "months": [

           "January"

         ]

       }

     },

     "replicaOptions": {

       "retention": {

         "count": 0

       },

       "schedule": {

         "months": [

           "January"

         ]

       }

     }

   },

   "yearlyScheduleEnabled": true,

   "yearlySchedule": {

     "timeLocal": "2020-05-29T10:12:06.530Z",

     "dayNumberInMonth": "First",

     "dayOfWeek": "Sunday",

     "dayOfMonth": 0,

     "month": "January",

     "retention": {

       "count": 0,

       "type": "Years"

     }

   }

 },

 "name": "string",

 "description": "string",

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

 "retrySettings": {

   "retryTimes": 0

 },

 "policyNotificationSettings": {

   "recipient": "string",

   "notifyOnSuccess": true,

   "notifyOnWarning": true,

   "notifyOnFailure": true

 },

 "backupType": "AllItems"

}

Response

The server returns the following response to the client.

Response Code

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 AWS 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://135.169.170.192:11005/api/v1/costEstimation

 

Request Header:

Authorization: Bearer <Access-Token>

x-api-version: 1.0-rev0

Content-Type: application/json

 

Request Body:

{ "snapshotSettings": {

      "copyTagsFromVolumeEnabled": false,

       "tryCreateVSSSnapshot": true

     },

     "replicaSettings": {

       "mapping": [

         {

           "sourceRegionId": "cd1fd042-c7bd-4ebe-b644-536e49fb65a2",

           "targetRegionId": "a78f0156-7e78-4585-86ec-5cc590409def",

           "targetAmazonAccountId": "eca01dcc-d324-4017-92cb-04ec240aaf0a"

         }

       ],

      "copyTagsFromVolumeEnabled": false

     },

     "regionIds": [

       "cd1fd042-c7bd-4ebe-b644-536e49fb65a2"

     ],

     "selectedItems": {

       "virtualMachineIds": [

         "be471476-66f4-4d2f-86c7-cffe34adf4cc"

       ]

     },

       "scheduleSettings": {

       "dailyScheduleEnabled": true,

       "dailySchedule": {

         "kind": "Everyday",

         "runsPerHour": 1,

         "days": [

           "Sunday",

           "Monday",

           "Tuesday",

           "Wednesday",

           "Thursday",

           "Friday",

           "Saturday"

         ],

         "snapshotOptions": {

           "retention": {

             "count": 7

           },

           "schedule": {

             "hours": [

               false,

               false,

               false,

               false,

               false,

               false,

               false,

               true,

               false,

               false,

               false,

               false,

               true,

               false,

               false,

               true,

               false,

               true,

               false,

               false,

               false,

               false,

               false,

               false

             ]

           }

         },

         "replicaOptions": {

           "retention": {

             "count": 7

           },

           "schedule": {

             "hours": [

               false,

               false,

               false,

               false,

               false,

               false,

               false,

               false,

               false,

               false,

               false,

               false,

               true,

               false,

               false,

               false,

               false,

               true,

               false,

               false,

               false,

               false,

               false,

               false

             ]

           }

         }

       },

       "weeklyScheduleEnabled": false,

       "monthlyScheduleEnabled": false,

       "yearlyScheduleEnabled": false

     },

     "name": "Snapshot + Replica",

     "amazonAccountId": "eca01dcc-d324-4017-92cb-04ec240aaf0a",

     "backupType": "SelectedItems"

}

 

Response:

200

 

Response Body:

{

 "totalCount": 1,

 "items": [

   {

     "virtualMachineId": "be471476-66f4-4d2f-86c7-cffe34adf4cc",

     "virtualMachineName": "oz-Tgt-01",

     "snapshotCost": 0.163361352,

     "replicaCost": 0.163361352,

     "backupCost": 0,

     "trafficCost": 0,

     "transactionCost": 0,

     "totalCost": 0.326722704

   }

 ],

 "isEmpty": false,

 "totalSnapshotCost": 0.163361352,

 "totalReplicaCost": 0.163361352,

 "totalBackupCost": 0,

 "totalTrafficCost": 0,

 "totalTransactionCost": 0,

 "totalCost": 0.326722704,

 "_links": [

   {

     "method": "GET",

     "rel": "self",

     "href": "https://135.169.170.192:11005/api/v1/costEstimation"

   }

 ]

}