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

Exporting Cost Estimations

This section explains how to export cost estimations.

Request

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

Request Headers

The request header must contain an authorization token of the current session.

Request Parameters

None.

Request Body

Property

Type

Description

name

string

Sets the name of the backup policy.

description

string

Sets the description of the backup policy.

isEnabled

boolean

Defines if the backup policy must be enabled upon creation.

priority

integer

Sets the priority for the backup policy.

tenantId

string

Sets the tenant identification number.

backupType

string

Sets the backup type.

regions

string

Sets the regions in which to look up for resources.

selectedItems

string

Sets the selected items. Possible types:

  • subscriptions
  • resourceGroups
  • tags
  • virtualMachines

excludedItems

string

Sets the selected items.

snapshotSettings

PolicySnapshotSettingsFromClient Object

Sets the PolicySnapshotSettingsFromClient object.

backupSettings

PolicyBackupSettingsFromClient Object

Sets the PolicyBackupSettingsFromClient object.

retrySettings

RetrySettings Object

Sets the RetrySettings object.

policyNotificationSettings

PolicyNotificationSettings Object

Sets the PolicyNotificationSettings object.

PolicySnapshotSettingsFromClient Object

Property

Type

Description

generationsToSave

integer

Sets the number of snapshots to be saved by the backup policy.

schedule

integer

Sets schedule parameters.

PolicyBackupSettingsFromClient Object

Property

Type

Description

targetRepositoryId

integer

Sets the identification number of the backup repository to which backups are going to be saved.

retentionSettings

RepositoryRetentionSettings Object

Sets the RepositoryRetentionSettings object.

schedule

string

Sets schedule parameters.

RetrySettings Object

Property

Type

Description

retryCount

integer

Sets the retry attempts number.

PolicyNotificationSettings Object

Property

Type

Description

recipient

string

Sets the email address to which notifications about backup policy results muse be sent.

notifyOnSuccess

boolean

Defines if a notification must be sent on Success.

notifyOnWarning

boolean

Defines if a notification must be sent on Warning.

notifyOnFailure

boolean

Defines if a notification must be sent on Failure.

Request Example

Request:

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

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

  "name":"Backup Policy",

  "description":"",

  "isEnabled":true,

  "priority":0,

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

  "backupType":"SelectedItems",

  "regions":[

     {

        "regionId":"westeurope"

     },

     {

        "regionId":"ukwest"

     },

     {

        "regionId":"northeurope"

     }

  ],

  "selectedItems":{

     "subscriptions":[

 

     ],

     "resourceGroups":[

 

     ],

     "tags":[

 

     ],

     "virtualMachines":[

        {

           "id":"j51e6w1d7uuadu3pyr8tmnpbgfcfimyg5k7rdeostc5redak5hjo"

        },

        {

           "id":"ej43ifg58cgjs8e9cod74ye6cbwm5nttf6ijzk64rshqoip1abqy"

        },

        {

           "id":"zmn8bnq3y9u7hyr1cmdu9x3b1exzefstqx5w7h9tkujs484xmgro"

        }

     ]

  },

  "excludedItems":{

     "virtualMachines":[

 

     ]

  },

  "snapshotSettings":{

     "generationsToSave":7,

     "schedule":{

        "frequencyType":"Monthly",

        "monthlyTime":"20:00:00",

        "monthlyType":"First",

        "monthlyDayOfWeek":"Monday",

        "monthlyLastDay":false,

        "monthlyDay":1,

        "selectedMonths":[

           "January",

           "February",

           "March",

           "April",

           "May",

           "June",

           "July",

           "August",

           "September",

           "October",

           "November",

           "December"

        ]

     }

  },

  "backupSettings":{

     "targetRepositoryId":1,

     "retentionSettings":{

        "retentionDurationType":"Daily",

        "timeRetentionDuration":21

     },

     "schedule":{

        "frequencyType":"Monthly",

        "monthlyTime":"20:00:00",

        "monthlyType":"First",

        "monthlyDayOfWeek":"Monday",

        "monthlyLastDay":false,

        "monthlyDay":1,

        "selectedMonths":[

           "January",

           "February",

           "March",

           "April",

           "May",

           "June",

           "July",

           "August",

           "September",

           "October",

           "November",

           "December"

        ]

     }

  },

  "retrySettings":{

     "retryCount":3

  }

}

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 HTTPS headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the response body message: application/json; charset=utf-8

Response Body

Property

Type

Description

protectedItemHashId

string

Shows the identification number of the VM for which the costs are being calculated.

name

string

Shows the name of the VM for which the costs are being calculated.

snapshotCost

CostEstimationItemCostsData Object

Contains the CostEstimationItemCostsData object that shows the following information (for snapshots):

  • Price per month.
  • Meters that are applied (per virtual disk).
  • Warnings (if any).

backupCost

CostEstimationItemCostsData Object

Contains the CostEstimationItemCostsData object that shows the following information (for backups):

  • Price per month.
  • Meters that are applied (per virtual disk).
  • Warnings (if any).

trafficCost

CostEstimationItemCostsData Object

Contains the CostEstimationItemCostsData object that shows the following information (for traffic costs):

  • Price per month.
  • Meters that are applied (per virtual disk).
  • Warnings (if any).

transactionCost

CostEstimationItemCostsData Object

Contains the CostEstimationItemCostsData object that shows the following information (for transaction costs):

  • Price per month.
  • Meters that are applied (per virtual disk).
  • Warnings (if any).

totalPerMonth

CostEstimationTotalValue Object

Contains the CostEstimationTotalValue object that shows the following information (total costs per month):

  • Price per month.
  • Meters that are applied (per virtual disk).
  • Warnings (if any).

Response Example

Response:

200 OK

 

Response Body:

[

     {

     "protectedItemHashId": "j51e6w1d7uuadu3pyr8tmnpbgfcfimyg5k7rdeostc5redak5hjo",

     "name": "",

     "snapshotCost":       {

        "pricePerMonth":          {

           "value": 15.190000152587892,

           "type": "Valid"

        },

        "meters":          [

                       {

              "resource":                {

                 "name": "_disk1_6da46a1680434a05b870b68bc8caf6ae",

                 "hashId": {"Value": "fqbikp7jcpazi3ycj9zyw8g9ja3rfrorfezemncdi3pb9d9qxe8o"},

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

                 "size": 30

              },

              "meterId": "78dd126f-f855-4670-8038-fd66cf0f43b9",

              "description": "LrsSnapshots/StandardHddManagedDisks",

              "unitPrice": 0.05,

              "unit": "OneGbPerMonth",

              "quantityUsed": 147

           },

                       {

              "resource":                {

                 "name": "_data_disk",

                 "hashId": {"Value": "fg97gdsx8kzmib1hiymb34o7cexurt7jnkmr76m5g8bjb9ns8aky"},

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

                 "size": 32

              },

              "meterId": "78dd126f-f855-4670-8038-fd66cf0f43b9",

              "description": "LrsSnapshots/StandardHddManagedDisks",

              "unitPrice": 0.05,

              "unit": "OneGbPerMonth",

              "quantityUsed": 156.8000030517578

           }

        ],

        "warnings": []

     },

     "backupCost":       {

        "pricePerMonth":          {

           "value": 2.141020132061094,

           "type": "Valid"

        },

        "meters":          [

                       {

              "resource":                {

                 "name": "_disk1_6da46a1680434a05b870b68bc8caf6ae",

                 "hashId": {"Value": "fqbikp7jcpazi3ycj9zyw8g9ja3rfrorfezemncdi3pb9d9qxe8o"},

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

                 "size": 30

              },

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

              "description": "Data Stored",

              "unitPrice": 0.049,

              "unit": "OneGbPerMonth",

              "quantityUsed": 15.014166556298733

           },

                       {

              "resource":                {

                 "name": "_disk1_6da46a1680434a05b870b68bc8caf6ae",

                 "hashId": {"Value": "fqbikp7jcpazi3ycj9zyw8g9ja3rfrorfezemncdi3pb9d9qxe8o"},

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

                 "size": 30

              },

              "meterId": "0984b7ed-975f-4dd1-8ba1-db05b74796d1",

              "description": "Geo Replication",

              "unitPrice": 0.02,

              "unit": "OneGb",

              "quantityUsed": 15.014166556298733

           },

                       {

              "resource":                {

                 "name": "_data_disk",

                 "hashId": {"Value": "fg97gdsx8kzmib1hiymb34o7cexurt7jnkmr76m5g8bjb9ns8aky"},

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

                 "size": 32

              },

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

              "description": "Data Stored",

              "unitPrice": 0.049,

              "unit": "OneGbPerMonth",

              "quantityUsed": 16.015110719949007

           },

                       {

              "resource":                {

                 "name": "_data_disk",

                 "hashId": {"Value": "fg97gdsx8kzmib1hiymb34o7cexurt7jnkmr76m5g8bjb9ns8aky"},

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

                 "size": 32

              },

              "meterId": "0984b7ed-975f-4dd1-8ba1-db05b74796d1",

              "description": "Geo Replication",

              "unitPrice": 0.02,

              "unit": "OneGb",

              "quantityUsed": 16.015110719949007

           }

        ],

        "warnings": []

     },

     "trafficCost":       {

        "pricePerMonth":          {

           "value": 0,

           "type": "Valid"

        },

        "meters":          [

                       {

              "resource":                {

                 "name": "_disk1_6da46a1680434a05b870b68bc8caf6ae",

                 "hashId": {"Value": "fqbikp7jcpazi3ycj9zyw8g9ja3rfrorfezemncdi3pb9d9qxe8o"},

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

                 "size": 30

              },

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

              "description": "Zone1/DataTransferOut",

              "unitPrice": 0.087,

              "unit": "OneGb",

              "quantityUsed": 0

           },

                       {

              "resource":                {

                 "name": "_data_disk",

                 "hashId": {"Value": "fg97gdsx8kzmib1hiymb34o7cexurt7jnkmr76m5g8bjb9ns8aky"},

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

                 "size": 32

              },

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

              "description": "Zone1/DataTransferOut",

              "unitPrice": 0.087,

              "unit": "OneGb",

              "quantityUsed": 0

           }

        ],

        "warnings": []

     },

     "transactionCost":       {

        "pricePerMonth":          {

           "value": 0.6035301289401663,

           "type": "Valid"

        },

        "meters":          [

                       {

              "resource":                {

                 "name": "_disk1_6da46a1680434a05b870b68bc8caf6ae",

                 "hashId": {"Value": "fqbikp7jcpazi3ycj9zyw8g9ja3rfrorfezemncdi3pb9d9qxe8o"},

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

                 "size": 30

              },

              "meterId": "f2b896ed-0fb5-48a5-a687-70c2f63e137b",

              "description": "Write Operations",

              "unitPrice": 0.108,

              "unit": "TenKilo",

              "quantityUsed": 2.6514205531884056

           },

                       {

              "resource":                {

                 "name": "_disk1_6da46a1680434a05b870b68bc8caf6ae",

                 "hashId": {"Value": "fqbikp7jcpazi3ycj9zyw8g9ja3rfrorfezemncdi3pb9d9qxe8o"},

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

                 "size": 30

              },

              "meterId": "54ef6a12-60c1-4248-878f-1d3d9da46833",

              "description": "Virtual Machine (Standard_A1_v2)",

              "unitPrice": 0.041,

              "unit": "OneHour",

              "quantityUsed": 0.005677290375247834

           },

                       {

              "resource":                {

                 "name": "_data_disk",

                 "hashId": {"Value": "fg97gdsx8kzmib1hiymb34o7cexurt7jnkmr76m5g8bjb9ns8aky"},

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

                 "size": 32

              },

              "meterId": "f2b896ed-0fb5-48a5-a687-70c2f63e137b",

              "description": "Write Operations",

              "unitPrice": 0.108,

              "unit": "TenKilo",

              "quantityUsed": 2.8281818752173913

           },

                       {

              "resource":                {

                 "name": "_data_disk",

                 "hashId": {"Value": "fg97gdsx8kzmib1hiymb34o7cexurt7jnkmr76m5g8bjb9ns8aky"},

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

                 "size": 32

              },

              "meterId": "54ef6a12-60c1-4248-878f-1d3d9da46833",

              "description": "Virtual Machine (Standard_A1_v2)",

              "unitPrice": 0.041,

              "unit": "OneHour",

              "quantityUsed": 0.006055776297092439

           }

        ],

        "warnings": []

     },

     "totalPerMonth":       {

        "pricePerMonth":          {

           "value": 17.934550413589154,

           "type": "Valid"

        },

        "warnings": []

     },

     "warnings": []

  },

     {

     "protectedItemHashId": "zmn8bnq3y9u7hyr1cmdu9x3b1exzefstqx5w7h9tkujs484xmgro",

     "name": "1",

     "snapshotCost":       {

        "pricePerMonth":          {

           "value": 31.11499938964844,

           "type": "Valid"

        },

        "meters": [         {

           "resource":             {

              "name": "1_OsDisk_1_18a99302a8484218ab24656cad86a513",

              "hashId": {"Value": "dhsirge6csexb6gsfecsyqu9iwsnwgyawgd81y876cuxegmy4ouy"},

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

              "size": 127

           },

           "meterId": "78dd126f-f855-4670-8038-fd66cf0f43b9",

           "description": "LrsSnapshots/StandardHddManagedDisks",

           "unitPrice": 0.05,

           "unit": "OneGbPerMonth",

           "quantityUsed": 622.2999877929688

        }],

        "warnings": []

     },

     "backupCost":       {

        "pricePerMonth":          {

           "value": 4.385638126370497,

           "type": "Valid"

        },

        "meters":          [

                       {

              "resource":                {

                 "name": "1_OsDisk_1_18a99302a8484218ab24656cad86a513",

                 "hashId": {"Value": "dhsirge6csexb6gsfecsyqu9iwsnwgyawgd81y876cuxegmy4ouy"},

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

                 "size": 127

              },

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

              "description": "Data Stored",

              "unitPrice": 0.049,

              "unit": "OneGbPerMonth",

              "quantityUsed": 63.55997284594923

           },

                       {

              "resource":                {

                 "name": "1_OsDisk_1_18a99302a8484218ab24656cad86a513",

                 "hashId": {"Value": "dhsirge6csexb6gsfecsyqu9iwsnwgyawgd81y876cuxegmy4ouy"},

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

                 "size": 127

              },

              "meterId": "0984b7ed-975f-4dd1-8ba1-db05b74796d1",

              "description": "Geo Replication",

              "unitPrice": 0.02,

              "unit": "OneGb",

              "quantityUsed": 63.55997284594923

           }

        ],

        "warnings": []

     },

     "trafficCost":       {

        "pricePerMonth":          {

           "value": 0,

           "type": "Valid"

        },

        "meters": [         {

           "resource":             {

              "name": "1_OsDisk_1_18a99302a8484218ab24656cad86a513",

              "hashId": {"Value": "dhsirge6csexb6gsfecsyqu9iwsnwgyawgd81y876cuxegmy4ouy"},

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

              "size": 127

           },

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

           "description": "Zone1/DataTransferOut",

           "unitPrice": 0.087,

           "unit": "OneGb",

           "quantityUsed": 0

        }],

        "warnings": []

     },

     "transactionCost":       {

        "pricePerMonth":          {

           "value": 1.236263360758224,

           "type": "Valid"

        },

        "meters":          [

                       {

              "resource":                {

                 "name": "1_OsDisk_1_18a99302a8484218ab24656cad86a513",

                 "hashId": {"Value": "dhsirge6csexb6gsfecsyqu9iwsnwgyawgd81y876cuxegmy4ouy"},

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

                 "size": 127

              },

              "meterId": "f2b896ed-0fb5-48a5-a687-70c2f63e137b",

              "description": "Write Operations",

              "unitPrice": 0.108,

              "unit": "TenKilo",

              "quantityUsed": 11.224347201449275

           },

                       {

              "resource":                {

                 "name": "1_OsDisk_1_18a99302a8484218ab24656cad86a513",

                 "hashId": {"Value": "dhsirge6csexb6gsfecsyqu9iwsnwgyawgd81y876cuxegmy4ouy"},

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

                 "size": 127

              },

              "meterId": "54ef6a12-60c1-4248-878f-1d3d9da46833",

              "description": "Virtual Machine (Standard_A1_v2)",

              "unitPrice": 0.041,

              "unit": "OneHour",

              "quantityUsed": 0.024033863001702325

           }

        ],

        "warnings": []

     },

     "totalPerMonth":       {

        "pricePerMonth":          {

           "value": 36.736900876777156,

           "type": "Valid"

        },

        "warnings": []

     },

     "warnings": []

  }

]

I want to report a typo

There is a misspelling right here:

 

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