Validating Azure Virtual Disks Restore
This section explains how to check whether a restore of a VHD is possible.
Request
POST https://<hostname>/api/v1/restorePoints/{restorePointId}/validateRestoreDisk/{vmId} |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The following parameters must be posted as URL.
Parameter | Description |
restorePointId | The identification number of the restore point. Can be obtained as described in Getting Restore Points. |
vmId | The identification number of the virtual machine. Can be obtained as described in Getting Virtual Machines. |
Request Body
Parameter | Type | Description |
restoreOptions | DiskBulkRestoreOptions Object | Contains the DiskBulkRestoreOptions object. |
validationSteps | string | Sets validation steps. |
Parameter | Type | Description |
reason | string | Sets the reason of the restore. |
toAlternative | DiskRestoreOptions Object | Sets the DiskRestoreOptions object |
toOriginal | DiskBulkRestoreToOriginalOptions Object | Sets the DiskBulkRestoreToOriginalOptions object |
Parameter | Type | Description |
restorePoint | RestorePoint Object | Sets the RestorePoint object. For more information about properties of this object, see Getting Restore Points. |
region | Region Object | Sets the Region object. For more information about properties of this object, see Getting Regions. |
subscription | AzureSubscription Object | Sets the AzureSubscription object. For more information about properties of this object, see Getting Subscriptions. |
diskId | string | Sets the identification number of the disk. |
name | string | Sets the name of the disk. |
type | string | Sets the type of the disk. |
resourceGroup | ResourceGroup Object | Sets the ResourceGroup object. For more information about properties of this object, see Getting Resource Groups. |
Request Example
Request: POST https://<hostname>/api/v1/restorePoints/8cf8d0ee-73fd-4a4e-833e-68e2c5b2bda5/validateRestoreDisk?vmId=oqedma7doo56krcqzp15xbdffenfpgcjzxpekgqnmw6dx65rnyxo
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "restoreOptions":{ "reason":"", "toAlternative":[ { "restorePoint":{ "id":"8cf8d0ee-73fd-4a4e-833e-68e2c5b2bda5", "pointInTime":"2020-02-14T07:22:47.184Z", "backupSizeBytes":32213303808, "backupDestination":"Snapshot", "usn":3, "_embeddedResources":{
}, "_links":{ "self":{ "href":"https://abc.ukwest.cloudapp.azure.com/api/v1/restorePoints/8cf8d0ee-73fd-4a4e-833e-68e2c5b2bda5" }, "BackupJob":{ "href":"https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/6" } }, "jobSessionId":6 }, "region":{ "id":"ukwest", "name":"UK West" }, "subscription":{ "id":"3a9a4930-7bbc-4b83-9c68-15d674fbc803", "environment":"Global", "tenantId":"3e924ba9-93bc-40d5-8a47-33f07b239a52", "tenantName":"abc GmbH", "name":"Visual Studio Premium MSDN", "status":"Active", "_links":{ "self":{ "href":"https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/subscriptions/3a9a4930-7bbc-4b83-9c68-15d674fbc803" }, "expiringConnection":{ "href":"https://abc.ukwest.cloudapp.azure.com/api/v1/accounts/1" } } }, "diskId":"zut5o4j5dmxxgxp7p9sczta6b1n6837dmwkheu41qg8enrizbjfo", "name":"bogatov_disk1_813f0657e5fa4661aaceb53564eba021", "type":"Managed", "resourceGroup":{ "id":"1yb941zuh6ze8bmfsnqcwot7i8wi8p5ufy34nc7mxiaq5z6mmc6y", "resourceId":"/subscriptions/3a9a4930-7bbc-4b83-9c68-15d674fbc803/resourcegroups/bogatov", "name":"abc", "azureEnvironment":"Global", "subscriptionId":"3a9a4930-7bbc-4b83-9c68-15d674fbc803", "regionId":"ukwest" } } ] }, "validationSteps":[ "ResourceGroup", "StorageAccount", "DiskType", "Name", "AvailabilityZone" ] } |
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
None.
Example
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK |